﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

/// Absolutely ALL enums in this library MUST indicate the scalar they are based/derived from.
namespace JasLib.Interop.Win32
{
    [Flags]
    public enum ADVF : uint
    {
        ADVF_NODATA = 1,
        ADVF_PRIMEFIRST = 2,
        ADVF_ONLYONCE = 4,
        ADVFCACHE_NOHANDLER = 8,
        ADVFCACHE_FORCEBUILTIN = 16,
        ADVFCACHE_ONSAVE = 32,
        ADVF_DATAONSTOP = 64,
    }

    [Flags]
    public enum BINDF : int
    {
        BINDF_ASYNCHRONOUS = 0x00000001,
        BINDF_ASYNCSTORAGE = 0x00000002,
        BINDF_NOPROGRESSIVERENDERING = 0x00000004,
        BINDF_OFFLINEOPERATION = 0x00000008,
        BINDF_GETNEWESTVERSION = 0x00000010,
        BINDF_NOWRITECACHE = 0x00000020,
        BINDF_NEEDFILE = 0x00000040,
        BINDF_PULLDATA = 0x00000080,
        BINDF_IGNORESECURITYPROBLEM = 0x00000100,
        BINDF_RESYNCHRONIZE = 0x00000200,
        BINDF_HYPERLINK = 0x00000400,
        BINDF_NO_UI = 0x00000800,
        BINDF_SILENTOPERATION = 0x00001000,
        BINDF_PRAGMA_NO_CACHE = 0x00002000,
        BINDF_GETCLASSOBJECT = 0x00004000,
        BINDF_RESERVED_1 = 0x00008000,
        BINDF_FREE_THREADED = 0x00010000,
        BINDF_DIRECT_READ = 0x00020000,
        BINDF_FORMS_SUBMIT = 0x00040000,
        BINDF_GETFROMCACHE_IF_NET_FAIL = 0x00080000,
        BINDF_FROMURLMON = 0x00100000,
        BINDF_FWD_BACK = 0x00200000,
        BINDF_PREFERDEFAULTHANDLER = 0x00400000,
        BINDF_ENFORCERESTRICTED = 0x00800000
    }

    [Flags]
    public enum BINDINFOF : uint
    {
        BINDINFOF_URLENCODESTGMEDDATA = 0,
        BINDINFOF_URLENCODEDEXTRAINFO = 1,
    }

    [Flags]
    public enum BINDINFO_OPTIONS : uint
    {
        BINDINFO_OPTIONS_WININETFLAG = 0x00010000,
        BINDINFO_OPTIONS_ENABLE_UTF8 = 0x00020000,
        BINDINFO_OPTIONS_DISABLE_UTF8 = 0x00040000,
        BINDINFO_OPTIONS_USE_IE_ENCODING = 0x00080000,
        BINDINFO_OPTIONS_BINDTOOBJECT = 0x00100000,
        BINDINFO_OPTIONS_SECURITYOPTOUT = 0x00200000,
        BINDINFO_OPTIONS_IGNOREMIMETEXTPLAIN = 0x00400000,
        BINDINFO_OPTIONS_USEBINDSTRINGCREDS = 0x00800000,
        BINDINFO_OPTIONS_IGNOREHTTPHTTPSREDIRECTS = 0x01000000,
        BINDINFO_OPTIONS_IGNORE_SSLERRORS_ONCE = 0x02000000,
        BINDINFO_WPC_DOWNLOADBLOCKED = 0x08000000,
        BINDINFO_WPC_LOGGING_ENABLED = 0x10000000,
        BINDINFO_OPTIONS_ALLOWCONNECTDATA = 0x20000000,
        BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS = 0x40000000,
        BINDINFO_OPTIONS_SHDOCVW_NAVIGATE = 0x80000000,
    }

    public enum BINDVERB : uint
    {
        BINDVERB_GET = 0x00000000,
        BINDVERB_POST = 0x00000001,
        BINDVERB_PUT = 0x00000002,
        BINDVERB_CUSTOM = 0x00000003,
        BINDVERB_RESERVED1 = 0x00000004
    }

    /// <summary>
    /// Byte-sized boolean variable. Be careful not to marshal as the standard 4-byte BOOL.
    /// </summary>
    public enum BOOLEAN : byte
    {
        FALSE = 0,
        TRUE = 1,
    }

    public enum BrowseForFolderMessageId : uint
    {
        // message from browser
        BFFM_INITIALIZED = 1,
        BFFM_SELCHANGED = 2,
        BFFM_VALIDATEFAILEDA = 3,   // lParam:szPath ret:1(cont),0(EndDialog)
        BFFM_VALIDATEFAILEDW = 4,   // lParam:wzPath ret:1(cont),0(EndDialog)
        BFFM_IUNKNOWN = 5,   // provides IUnknown to client. lParam: IUnknown*

        // messages to browser
        BFFM_SETSTATUSTEXTA = (WindowMessageId.WM_USER + 100),
        BFFM_ENABLEOK = (WindowMessageId.WM_USER + 101),
        BFFM_SETSELECTIONA = (WindowMessageId.WM_USER + 102),
        BFFM_SETSELECTIONW = (WindowMessageId.WM_USER + 103),
        BFFM_SETSTATUSTEXTW = (WindowMessageId.WM_USER + 104),
        BFFM_SETOKTEXT = (WindowMessageId.WM_USER + 105), // Unicode only
        BFFM_SETEXPANDED = (WindowMessageId.WM_USER + 106), // Unicode only
    }

    [Flags]
    public enum BrowseInfoFlags : uint
    {
        /// <summary>For finding a folder to start document searching</summary>
        BIF_RETURNONLYFSDIRS = 0x00000001,
        /// <summary>For starting the Find Computer</summary>
        BIF_DONTGOBELOWDOMAIN = 0x00000002,
        /// <summary>
        /// Top of the dialog has 2 lines of text for BROWSEINFO.lpszTitle and one line if
        /// this flag is set.  Passing the message BFFM_SETSTATUSTEXTA to the hwnd can set the
        /// rest of the text.  This is not used with BIF_USENEWUI and BROWSEINFO.lpszTitle gets
        /// all three lines of text.
        /// </summary>
        BIF_STATUSTEXT = 0x00000004,
        BIF_RETURNFSANCESTORS = 0x00000008,
        /// <summary>Add an editbox to the dialog</summary>
        BIF_EDITBOX = 0x00000010,
        /// <summary>insist on valid result (or CANCEL)</summary>
        BIF_VALIDATE = 0x00000020,

        /// <summary>Use the new dialog layout with the ability to resize. Caller needs to call OleInitialize() before using this API</summary>
        BIF_NEWDIALOGSTYLE = 0x00000040,

        BIF_USENEWUI = (BIF_NEWDIALOGSTYLE | BIF_EDITBOX),

        /// <summary>Allow URLs to be displayed or entered. (Requires BIF_USENEWUI)</summary>
        BIF_BROWSEINCLUDEURLS = 0x00000080,
        /// <summary>Add a UA hint to the dialog, in place of the edit box. May not be combined with BIF_EDITBOX</summary>
        BIF_UAHINT = 0x00000100,
        /// <summary>Do not add the "New Folder" button to the dialog.  Only applicable with BIF_NEWDIALOGSTYLE.</summary>
        BIF_NONEWFOLDERBUTTON = 0x00000200,
        /// <summary>don't traverse target as shortcut</summary>
        BIF_NOTRANSLATETARGETS = 0x00000400,
        /// <summary>Browsing for Computers.</summary>
        BIF_BROWSEFORCOMPUTER = 0x00001000,
        /// <summary>Browsing for Printers</summary>
        BIF_BROWSEFORPRINTER = 0x00002000,
        /// <summary>Browsing for Everything</summary>
        BIF_BROWSEINCLUDEFILES = 0x00004000,
        /// <summary>sharable resources displayed (remote shares, requires BIF_USENEWUI)</summary>
        BIF_SHAREABLE = 0x00008000,
        /// <summary>allow folder junctions like zip files and libraries to be browsed</summary>
        BIF_BROWSEFILEJUNCTIONS = 0x00010000,
    }

    public enum CBTHookCode : int
    {
        HCBT_MOVESIZE = 0,
        HCBT_MINMAX = 1,
        HCBT_QS = 2,
        HCBT_CREATEWND = 3,
        HCBT_DESTROYWND = 4,
        HCBT_ACTIVATE = 5,
        HCBT_CLICKSKIPPED = 6,
        HCBT_KEYSKIPPED = 7,
        HCBT_SYSCOMMAND = 8,
        HCBT_SETFOCUS = 9,
    }

    /// <summary>
    /// These flags are used with the ChildWindowFromPointEx API.
    /// </summary>
    [Flags]
    public enum ChildWindowFromPointFlags : uint
    {
        /// <summary>Does not skip any child windows.</summary>
        CWP_ALL = 0x0000,
        /// <summary>Skips invisible child windows.</summary>
        CWP_SKIPINVISIBLE = 0x0001,
        /// <summary>Skips disabled child windows.</summary>
        CWP_SKIPDISABLED = 0x0002,
        /// <summary>Skips transparent child windows.</summary>
        CWP_SKIPTRANSPARENT = 0x0004,
    }

    [Flags]
    public enum CIMTYPE : int
    {
        CIM_ILLEGAL = 0xfff,
        CIM_EMPTY = 0,
        CIM_SINT8 = 16,
        CIM_UINT8 = 17,
        CIM_SINT16 = 2,
        CIM_UINT16 = 18,
        CIM_SINT32 = 3,
        CIM_UINT32 = 19,
        CIM_SINT64 = 20,
        CIM_UINT64 = 21,
        CIM_REAL32 = 4,
        CIM_REAL64 = 5,
        CIM_BOOLEAN = 11,
        CIM_STRING = 8,
        CIM_DATETIME = 101,
        CIM_REFERENCE = 102,
        CIM_CHAR16 = 103,
        CIM_OBJECT = 13,
        CIM_FLAG_ARRAY = 0x2000,
    }

    public enum ClassLongOffset : int
    {
        GCL_MENUNAME = -8,
        GCL_HBRBACKGROUND = -10,
        GCL_HCURSOR = -12,
        GCL_HICON = -14,
        GCL_HMODULE = -16,
        GCL_CBWNDEXTRA = -18,
        GCL_CBCLSEXTRA = -20,
        GCL_WNDPROC = -24,
        GCL_STYLE = -26,
        GCW_ATOM = -32,
        GCL_HICONSM = -34,
    }

    public enum ClassLongPtrOffset : int
    {
        GCLP_MENUNAME = -8,
        GCLP_HBRBACKGROUND = -10,
        GCLP_HCURSOR = -12,
        GCLP_HICON = -14,
        GCLP_HMODULE = -16,
        GCL_CBWNDEXTRA = -18,
        GCL_CBCLSEXTRA = -20,
        GCLP_WNDPROC = -24,
        GCL_STYLE = -26,
        GCW_ATOM = -32,
        GCLP_HICONSM = -34,
    }

    public enum CLIPFORMAT : ushort
    {
        CF_TEXT = 1,
        CF_BITMAP = 2,
        CF_METAFILEPICT = 3,
        CF_SYLK = 4,
        CF_DIF = 5,
        CF_TIFF = 6,
        CF_OEMTEXT = 7,
        CF_DIB = 8,
        CF_PALETTE = 9,
        CF_PENDATA = 10,
        CF_RIFF = 11,
        CF_WAVE = 12,
        CF_UNICODETEXT = 13,
        CF_ENHMETAFILE = 14,
        CF_HDROP = 15,
        CF_LOCALE = 16,
        CF_DIBV5 = 17,
        CF_OWNERDISPLAY = 0x0080,
        CF_DSPTEXT = 0x0081,
        CF_DSPBITMAP = 0x0082,
        CF_DSPMETAFILEPICT = 0x0083,
        CF_DSPENHMETAFILE = 0x008E,
    }

    [Flags]
    public enum CLSCTX : uint
    {
        CLSCTX_INPROC_SERVER = 0x1,
        CLSCTX_INPROC_HANDLER = 0x2,
        CLSCTX_LOCAL_SERVER = 0x4,
        CLSCTX_INPROC_SERVER16 = 0x8,
        CLSCTX_REMOTE_SERVER = 0x10,
        CLSCTX_INPROC_HANDLER16 = 0x20,
        CLSCTX_RESERVED1 = 0x40,
        CLSCTX_RESERVED2 = 0x80,
        CLSCTX_RESERVED3 = 0x100,
        CLSCTX_RESERVED4 = 0x200,
        CLSCTX_NO_CODE_DOWNLOAD = 0x400,
        CLSCTX_RESERVED5 = 0x800,
        CLSCTX_NO_CUSTOM_MARSHAL = 0x1000,
        CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000,
        CLSCTX_NO_FAILURE_LOG = 0x4000,
        CLSCTX_DISABLE_AAA = 0x8000,
        CLSCTX_ENABLE_AAA = 0x10000,
        CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000,
        CLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000,
        CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000,
        CLSCTX_ENABLE_CLOAKING = 0x100000,
        CLSCTX_PS_DLL = 0x80000000,
    }

    public enum CodePage : ushort
    {
        CP_ACP = 0,// default to ANSI code page
        CP_OEMCP = 1,// default to OEM  code page
        CP_MACCP = 2,// default to MAC  code page
        CP_THREAD_ACP = 3,// current thread's ANSI code page
        CP_SYMBOL = 42,// SYMBOL translations
        CP_UTF7 = 65000,// UTF-7 translation
        CP_UTF8 = 65001,// UTF-8 translation
        CP_WINANSI = 1004,
        /// <summary>UTF-16 little endian</summary>
        CP_WINUNICODE = 1200,
    }

    [Flags]
    public enum COINIT : uint
    {
        COINIT_APARTMENTTHREADED = 0x2,
        COINIT_MULTITHREADED = 0x0,
        COINIT_DISABLE_OLE1DDE = 0x4,
        COINIT_SPEED_OVER_MEMORY = 0x8,
    }

    public enum CoInternetSetFeatureCode : uint
    {
        ///<summary>The current thread.</summary>
        SET_FEATURE_ON_THREAD = 0x00000001,
        ///<summary>The current process.
        SET_FEATURE_ON_PROCESS = 0x00000002,
        ///<summary>Reserved. Do not use.
        SET_FEATURE_IN_REGISTRY = 0x00000004,
        ///<summary>The local machine zone.
        SET_FEATURE_ON_THREAD_LOCALMACHINE = 0x00000008,
        ///<summary>The intranet zone.
        SET_FEATURE_ON_THREAD_INTRANET = 0x00000010,
        ///<summary>The trusted zone.
        SET_FEATURE_ON_THREAD_TRUSTED = 0x00000020,
        ///<summary>The Internet zone.
        SET_FEATURE_ON_THREAD_INTERNET = 0x00000040,
        ///<summary>The restricted zone.
        SET_FEATURE_ON_THREAD_RESTRICTED = 0x00000080,
    }

    public enum CoInternetGetFeatureCode : uint
    {
        ///<summary>The current thread.</summary>
        GET_FEATURE_ON_THREAD = 0x00000001,
        ///<summary>The current process.
        GET_FEATURE_ON_PROCESS = 0x00000002,
        ///<summary>Reserved. Do not use.
        GET_FEATURE_IN_REGISTRY = 0x00000004,
        ///<summary>The local machine zone.
        GET_FEATURE_ON_THREAD_LOCALMACHINE = 0x00000008,
        ///<summary>The intranet zone.
        GET_FEATURE_ON_THREAD_INTRANET = 0x00000010,
        ///<summary>The trusted zone.
        GET_FEATURE_ON_THREAD_TRUSTED = 0x00000020,
        ///<summary>The Internet zone.
        GET_FEATURE_ON_THREAD_INTERNET = 0x00000040,
        ///<summary>The restricted zone.
        GET_FEATURE_ON_THREAD_RESTRICTED = 0x00000080,
    }

    public enum COMPUTER_NAME_FORMAT : int
    {
        ComputerNameNetBIOS = 0,
        ComputerNameDnsHostname = 1,
        ComputerNameDnsDomain = 2,
        ComputerNameDnsFullyQualified = 3,
        ComputerNamePhysicalNetBIOS = 4,
        ComputerNamePhysicalDnsHostname = 5,
        ComputerNamePhysicalDnsDomain = 6,
        ComputerNamePhysicalDnsFullyQualified = 7,
        ComputerNameMax = 8,
    }

    public enum CopyProgressResult : uint
    {
        Continue = 0,
        Cancel = 1,
        Stop = 2,
        Quiet = 3
    }

    public enum CopyProgressCallbackReason : uint
    {
        ChunkFinished = 0x00000000,
        StreamFinished = 0x00000001
    }

    [Flags]
    public enum CopyFileFlags : uint
    {
        COPY_FILE_FAIL_IF_EXISTS = 0x00000001,
        COPY_FILE_RESTARTABLE = 0x00000002,
        COPY_FILE_OPEN_SOURCE_FOR_WRITE = 0x00000004,
        COPY_FILE_ALLOW_DECRYPTED_DESTINATION = 0x00000008,
        /*  Gap for private copyfile flags */
        COPY_FILE_COPY_SYMLINK = 0x00000800,
        COPY_FILE_NO_BUFFERING = 0x00001000,
        COPY_FILE_REQUEST_SECURITY_PRIVILEGES = 0x00002000,
        COPY_FILE_RESUME_FROM_PAUSE = 0x00004000,
        COPY_FILE_NO_OFFLOAD = 0x00040000,
    }

    [Flags]
    public enum CreateEnlistmentOptions : uint
    {
        ENLISTMENT_SUPERIOR = 0x00000001,
    }

    [Flags]
    public enum CreateEventFlags : uint
    {
        CREATE_EVENT_MANUAL_RESET = 0x00000001,
        CREATE_EVENT_INITIAL_SET = 0x00000002,
    }

    [Flags]
    public enum CreateProcessFlags : uint
    {
        DEBUG_PROCESS = 0x00000001,
        DEBUG_ONLY_THIS_PROCESS = 0x00000002,
        CREATE_SUSPENDED = 0x00000004,
        DETACHED_PROCESS = 0x00000008,
        CREATE_NEW_CONSOLE = 0x00000010,
        NORMAL_PRIORITY_CLASS = 0x00000020,
        IDLE_PRIORITY_CLASS = 0x00000040,
        HIGH_PRIORITY_CLASS = 0x00000080,
        REALTIME_PRIORITY_CLASS = 0x00000100,
        CREATE_NEW_PROCESS_GROUP = 0x00000200,
        CREATE_UNICODE_ENVIRONMENT = 0x00000400,
        CREATE_SEPARATE_WOW_VDM = 0x00000800,
        CREATE_SHARED_WOW_VDM = 0x00001000,
        CREATE_FORCEDOS = 0x00002000,
        BELOW_NORMAL_PRIORITY_CLASS = 0x00004000,
        ABOVE_NORMAL_PRIORITY_CLASS = 0x00008000,
        INHERIT_PARENT_AFFINITY = 0x00010000,
        INHERIT_CALLER_PRIORITY = 0x00020000,
        CREATE_PROTECTED_PROCESS = 0x00040000,
        EXTENDED_STARTUPINFO_PRESENT = 0x00080000,
        PROCESS_MODE_BACKGROUND_BEGIN = 0x00100000,
        PROCESS_MODE_BACKGROUND_END = 0x00200000,
        CREATE_BREAKAWAY_FROM_JOB = 0x01000000,
        CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x02000000,
        CREATE_DEFAULT_ERROR_MODE = 0x04000000,
        CREATE_NO_WINDOW = 0x08000000,
        PROFILE_USER = 0x10000000,
        PROFILE_KERNEL = 0x20000000,
        PROFILE_SERVER = 0x40000000,
        CREATE_IGNORE_SYSTEM_DEFAULT = 0x80000000,
    }

    [Flags]
    public enum CreateResourceManagerOptions : uint
    {
        RESOURCE_MANAGER_VOLATILE = 0x00000001,
        RESOURCE_MANAGER_COMMUNICATION = 0x00000002,
    }

    [Flags]
    public enum CreateThreadFlags : uint
    {
        CREATE_SUSPENDED = CreateProcessFlags.CREATE_SUSPENDED,
        STACK_SIZE_PARAM_IS_A_RESERVATION = 0x00010000,
    }

    [Flags]
    public enum CreateTransactionManagerOptions : uint
    {
        TRANSACTION_MANAGER_VOLATILE = 0x00000001,
        TRANSACTION_MANAGER_COMMIT_DEFAULT = 0x00000000,
        TRANSACTION_MANAGER_COMMIT_SYSTEM_VOLUME = 0x00000002,
        TRANSACTION_MANAGER_COMMIT_SYSTEM_HIVES = 0x00000004,
        TRANSACTION_MANAGER_COMMIT_LOWEST = 0x00000008,
        TRANSACTION_MANAGER_CORRUPT_FOR_RECOVERY = 0x00000010,
        TRANSACTION_MANAGER_CORRUPT_FOR_PROGRESS = 0x00000020,
    }

    [Flags]
    public enum CreateTransactionOptions : uint
    {
        TRANSACTION_DO_NOT_PROMOTE = 0x00000001,
    }

    [Flags]
    public enum CSIDL : int
    {
        CSIDL_DESKTOP = 0x0000,// <desktop>
        CSIDL_INTERNET = 0x0001,// Internet Explorer (icon on desktop)
        CSIDL_PROGRAMS = 0x0002,// Start Menu\Programs
        CSIDL_CONTROLS = 0x0003,// My Computer\Control Panel
        CSIDL_PRINTERS = 0x0004,// My Computer\Printers
        CSIDL_MYDOCUMENTS = 0x0005,// My Documents
        CSIDL_FAVORITES = 0x0006,// <user name>\Favorites
        CSIDL_STARTUP = 0x0007,// Start Menu\Programs\Startup
        CSIDL_RECENT = 0x0008,// <user name>\Recent
        CSIDL_SENDTO = 0x0009,// <user name>\SendTo
        CSIDL_BITBUCKET = 0x000a,// <desktop>\Recycle Bin
        CSIDL_STARTMENU = 0x000b,// <user name>\Start Menu
        CSIDL_MYMUSIC = 0x000d,// "My Music" folder
        CSIDL_MYVIDEO = 0x000e,// "My Videos" folder
        CSIDL_DESKTOPDIRECTORY = 0x0010,// <user name>\Desktop
        CSIDL_DRIVES = 0x0011,// My Computer
        CSIDL_NETWORK = 0x0012,// Network Neighborhood (My Network Places)
        CSIDL_NETHOOD = 0x0013,// <user name>\nethood
        CSIDL_FONTS = 0x0014,// windows\fonts
        CSIDL_TEMPLATES = 0x0015,
        CSIDL_COMMON_STARTMENU = 0x0016,// All Users\Start Menu
        CSIDL_COMMON_PROGRAMS = 0x0017,// All Users\Start Menu\Programs
        CSIDL_COMMON_STARTUP = 0x0018,// All Users\Startup
        CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019,// All Users\Desktop
        CSIDL_APPDATA = 0x001a,// <user name>\Application Data
        CSIDL_PRINTHOOD = 0x001b,// <user name>\PrintHood
        CSIDL_LOCAL_APPDATA = 0x001c,// <user name>\Local Settings\Applicaiton Data (non roaming)
        CSIDL_ALTSTARTUP = 0x001d,// non localized startup
        CSIDL_COMMON_ALTSTARTUP = 0x001e,// non localized common startup
        CSIDL_COMMON_FAVORITES = 0x001f,
        CSIDL_INTERNET_CACHE = 0x0020,
        CSIDL_COOKIES = 0x0021,
        CSIDL_HISTORY = 0x0022,
        CSIDL_COMMON_APPDATA = 0x0023,// All Users\Application Data
        CSIDL_WINDOWS = 0x0024,// GetWindowsDirectory()
        CSIDL_SYSTEM = 0x0025,// GetSystemDirectory()
        CSIDL_PROGRAM_FILES = 0x0026,// C:\Program Files
        CSIDL_MYPICTURES = 0x0027,// C:\Program Files\My Pictures
        CSIDL_PROFILE = 0x0028,// USERPROFILE
        CSIDL_SYSTEMX86 = 0x0029,// x86 system directory on RISC
        CSIDL_PROGRAM_FILESX86 = 0x002a,// x86 C:\Program Files on RISC
        CSIDL_PROGRAM_FILES_COMMON = 0x002b,// C:\Program Files\Common
        CSIDL_PROGRAM_FILES_COMMONX86 = 0x002c,// x86 Program Files\Common on RISC
        CSIDL_COMMON_TEMPLATES = 0x002d,// All Users\Templates
        CSIDL_COMMON_DOCUMENTS = 0x002e,// All Users\Documents
        CSIDL_COMMON_ADMINTOOLS = 0x002f,// All Users\Start Menu\Programs\Administrative Tools
        CSIDL_ADMINTOOLS = 0x0030,// <user name>\Start Menu\Programs\Administrative Tools
        CSIDL_CONNECTIONS = 0x0031,// Network and Dial-up Connections
        CSIDL_COMMON_MUSIC = 0x0035,// All Users\My Music
        CSIDL_COMMON_PICTURES = 0x0036,// All Users\My Pictures
        CSIDL_COMMON_VIDEO = 0x0037,// All Users\My Video
        CSIDL_RESOURCES = 0x0038,// Resource Direcotry
        CSIDL_RESOURCES_LOCALIZED = 0x0039,// Localized Resource Direcotry
        CSIDL_COMMON_OEM_LINKS = 0x003a,// Links to All Users OEM specific apps
        CSIDL_CDBURN_AREA = 0x003b,// USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
        CSIDL_COMPUTERSNEARME = 0x003d,// Computers Near Me (computered from Workgroup membership)
        CSIDL_FLAG_CREATE = 0x8000,// combine with CSIDL_ value to force folder creation in SHGetFolderPath()
        CSIDL_FLAG_DONT_VERIFY = 0x4000,// combine with CSIDL_ value to return an unverified folder path
        CSIDL_FLAG_DONT_UNEXPAND = 0x2000,// combine with CSIDL_ value to avoid unexpanding environment variables
        CSIDL_FLAG_NO_ALIAS = 0x1000,// combine with CSIDL_ value to insure non-alias versions of the pidl
        CSIDL_FLAG_PER_USER_INIT = 0x0800,// combine with CSIDL_ value to indicate per-user init (eg. upgrade)
        CSIDL_FLAG_MASK = 0xFF00,// mask for all possible flag values
    }

    public enum DefaultMonitorCode : uint
    {
        MONITOR_DEFAULTTONULL = 0x00000000,
        MONITOR_DEFAULTTOPRIMARY = 0x00000001,
        MONITOR_DEFAULTTONEAREST = 0x00000002,
    }

    [Flags]
    public enum DesktopFlags : uint
    {
        /// <summary>Allows processes running in other accounts on the desktop to set hooks in this process.</summary>
        DF_ALLOWOTHERACCOUNTHOOK = 0x0001,
    }

    [Flags]
    public enum DesktopAccessRights : uint
    {
        /// <summary>Required to create a menu on the desktop.</summary>
        DESKTOP_CREATEMENU = 0x0004,
        /// <summary>Required to create a window on the desktop.</summary>
        DESKTOP_CREATEWINDOW = 0x0002,
        /// <summary>Required for the desktop to be enumerated.</summary>
        DESKTOP_ENUMERATE = 0x0040,
        /// <summary>Required to establish any of the window hooks.</summary>
        DESKTOP_HOOKCONTROL = 0x0008,
        /// <summary>Required to perform journal playback on a desktop.</summary>
        DESKTOP_JOURNALPLAYBACK = 0x0020,
        /// <summary>Required to perform journal recording on a desktop.</summary>
        DESKTOP_JOURNALRECORD = 0x0010,
        /// <summary>Required to read objects on the desktop.</summary>
        DESKTOP_READOBJECTS = 0x0001,
        /// <summary>Required to activate the desktop using the SwitchDesktop function.</summary>
        DESKTOP_SWITCHDESKTOP = 0x0100,
        /// <summary>Required to write objects on the desktop.</summary>
        DESKTOP_WRITEOBJECTS = 0x0080,

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    [Flags]
    public enum DialogCodeFlags : int
    {
        /// <summary>Control wants arrow keys</summary>
        DLGC_WANTARROWS = 0x0001,
        /// <summary>Control wants tab keys</summary>
        DLGC_WANTTAB = 0x0002,
        /// <summary>Control wants all keys</summary>
        DLGC_WANTALLKEYS = 0x0004,
        /// <summary>Pass message to control</summary>
        DLGC_WANTMESSAGE = 0x0004,
        /// <summary>Understands EM_SETSEL message</summary>
        DLGC_HASSETSEL = 0x0008,
        /// <summary>Default pushbutton</summary>
        DLGC_DEFPUSHBUTTON = 0x0010,
        /// <summary>Non-default pushbutton</summary>
        DLGC_UNDEFPUSHBUTTON = 0x0020,
        /// <summary>Radio button</summary>
        DLGC_RADIOBUTTON = 0x0040,
        /// <summary>Want WM_CHAR messages</summary>
        DLGC_WANTCHARS = 0x0080,
        /// <summary>Static item: don't include</summary>
        DLGC_STATIC = 0x0100,
        /// <summary>Button item: can be checked</summary>
        DLGC_BUTTON = 0x2000,
    }

    public enum DialogResultType : int
    {
        /// <summary>The OK button was selected.</summary>
        IDOK = 1,
        /// <summary>The Cancel button was selected.</summary>
        IDCANCEL = 2,
        /// <summary>The Abort button was selected.</summary>
        IDABORT = 3,
        /// <summary>The Retry button was selected.</summary>
        IDRETRY = 4,
        /// <summary>The Ignore button was selected.</summary>
        IDIGNORE = 5,
        /// <summary>The Yes button was selected.</summary>
        IDYES = 6,
        /// <summary>The No button was selected.</summary>
        IDNO = 7,
        /// <summary>The Close button was selected.</summary>
        IDCLOSE = 8,
        /// <summary>The Try Again button was selected.</summary>
        IDTRYAGAIN = 10,
        /// <summary>The Continue button was selected.</summary>
        IDCONTINUE = 11,
        /// <summary>The timeout interval elapsed. Used with WTSSendMessage().</summary>
        IDTIMEOUT = 32000,
        /// <summary>The function returned without waiting for a response. Used with WTSSendMessage().</summary>
        IDASYNC = 32001,
    }

    [Flags]
    public enum DirectoryAccessRights : uint
    {
        DIRECTORY_QUERY = 0x0001,
        DIRECTORY_TRAVERSE = 0x0002,
        DIRECTORY_CREATE_OBJECT = 0x0004,
        DIRECTORY_CREATE_SUBDIRECTORY = 0x0008,
        DIRECTORY_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | 0xF),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    public enum DISPID : int
    {
        DISPID_UNKNOWN = -1,
        /// <summary>DISPID reserved for the "value" property</summary>
        DISPID_VALUE = 0,
        /// <summary>
        /// The following DISPID is reserved to indicate the param
        /// that is the right-hand-side (or "put" value) of a PropertyPut
        /// </summary>
        DISPID_PROPERTYPUT = -3,
        /// <summary>DISPID reserved for the standard "NewEnum" method</summary>
        DISPID_NEWENUM = -4,
        /// <summary>DISPID reserved for the standard "Evaluate" method</summary>
        DISPID_EVALUATE = -5,
        DISPID_CONSTRUCTOR = -6,
        DISPID_DESTRUCTOR = -7,
        DISPID_COLLECT = -8,
    }

    public enum DriveType : int
    {
        DRIVE_UNKNOWN = 0,
        DRIVE_NO_ROOT_DIR = 1,
        DRIVE_REMOVABLE = 2,
        DRIVE_FIXED = 3,
        DRIVE_REMOTE = 4,
        DRIVE_CDROM = 5,
        DRIVE_RAMDISK = 6,
    }

    [Flags]
    public enum DuplicateHandleOptions : uint
    {
        /// <summary>Closes the source handle. This occurs regardless of any error status returned.</summary>
        DUPLICATE_CLOSE_SOURCE = 0x00000001,
        /// <summary>Ignores the dwDesiredAccess parameter. The duplicate handle has the same access as the source handle.</summary>
        DUPLICATE_SAME_ACCESS = 0x00000002,
    }

    public enum DVASPECT : uint
    {
        DVASPECT_CONTENT = 1,
        DVASPECT_THUMBNAIL = 2,
        DVASPECT_ICON = 4,
        DVASPECT_DOCPRINT = 8,
    }

    [Flags]
    public enum DWM_BB : uint
    {
        DWM_BB_ENABLE = 1,
        DWM_BB_BLURREGION = 2,
        DWM_BB_TRANSITIONONMAXIMIZED = 4,
    }

    [Flags]
    public enum EnlistmentAccessRights : uint
    {
        ENLISTMENT_QUERY_INFORMATION = 0x0001,
        ENLISTMENT_SET_INFORMATION = 0x0002,
        ENLISTMENT_RECOVER = 0x0004,
        ENLISTMENT_SUBORDINATE_RIGHTS = 0x0008,
        ENLISTMENT_SUPERIOR_RIGHTS = 0x0010,

        ENLISTMENT_GENERIC_READ =
            (STANDARD_RIGHTS_READ |
            ENLISTMENT_QUERY_INFORMATION),
        ENLISTMENT_GENERIC_WRITE =
            (STANDARD_RIGHTS_WRITE |
            ENLISTMENT_SET_INFORMATION |
            ENLISTMENT_RECOVER |
            ENLISTMENT_SUBORDINATE_RIGHTS |
            ENLISTMENT_SUPERIOR_RIGHTS),
        ENLISTMENT_GENERIC_EXECUTE =
            (STANDARD_RIGHTS_EXECUTE |
            ENLISTMENT_RECOVER |
            ENLISTMENT_SUBORDINATE_RIGHTS |
            ENLISTMENT_SUPERIOR_RIGHTS),
        ENLISTMENT_ALL_ACCESS =
            (STANDARD_RIGHTS_REQUIRED |
            ENLISTMENT_GENERIC_READ |
            ENLISTMENT_GENERIC_WRITE |
            ENLISTMENT_GENERIC_EXECUTE),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    public enum EventHeaderExtendedType : ushort
    {
        EVENT_HEADER_EXT_TYPE_RELATED_ACTIVITYID = 0x0001,
        EVENT_HEADER_EXT_TYPE_SID = 0x0002,
        EVENT_HEADER_EXT_TYPE_TS_ID = 0x0003,
        EVENT_HEADER_EXT_TYPE_INSTANCE_INFO = 0x0004,
        EVENT_HEADER_EXT_TYPE_STACK_TRACE32 = 0x0005,
        EVENT_HEADER_EXT_TYPE_STACK_TRACE64 = 0x0006,
        EVENT_HEADER_EXT_TYPE_MAX = 0x0007,
    }

    public enum errno_t : int
    {
        EPERM = 1,
        ENOENT = 2,
        ESRCH = 3,
        EINTR = 4,
        EIO = 5,
        ENXIO = 6,
        E2BIG = 7,
        ENOEXEC = 8,
        EBADF = 9,
        ECHILD = 10,
        EAGAIN = 11,
        ENOMEM = 12,
        EACCES = 13,
        EFAULT = 14,
        EBUSY = 16,
        EEXIST = 17,
        EXDEV = 18,
        ENODEV = 19,
        ENOTDIR = 20,
        EISDIR = 21,
        ENFILE = 23,
        EMFILE = 24,
        ENOTTY = 25,
        EFBIG = 27,
        ENOSPC = 28,
        ESPIPE = 29,
        EROFS = 30,
        EMLINK = 31,
        EPIPE = 32,
        EDOM = 33,
        EDEADLK = 36,
        EDEADLOCK = EDEADLK,
        ENAMETOOLONG = 38,
        ENOLCK = 39,
        ENOSYS = 40,
        ENOTEMPTY = 41,
        EINVAL = 22,
        ERANGE = 34,
        EILSEQ = 42,
        STRUNCATE = 80,
        EADDRINUSE = 100,
        EADDRNOTAVAIL = 101,
        EAFNOSUPPORT = 102,
        EALREADY = 103,
        EBADMSG = 104,
        ECANCELED = 105,
        ECONNABORTED = 106,
        ECONNREFUSED = 107,
        ECONNRESET = 108,
        EDESTADDRREQ = 109,
        EHOSTUNREACH = 110,
        EIDRM = 111,
        EINPROGRESS = 112,
        EISCONN = 113,
        ELOOP = 114,
        EMSGSIZE = 115,
        ENETDOWN = 116,
        ENETRESET = 117,
        ENETUNREACH = 118,
        ENOBUFS = 119,
        ENODATA = 120,
        ENOLINK = 121,
        ENOMSG = 122,
        ENOPROTOOPT = 123,
        ENOSR = 124,
        ENOSTR = 125,
        ENOTCONN = 126,
        ENOTRECOVERABLE = 127,
        ENOTSOCK = 128,
        ENOTSUP = 129,
        EOPNOTSUPP = 130,
        EOTHER = 131,
        EOVERFLOW = 132,
        EOWNERDEAD = 133,
        EPROTO = 134,
        EPROTONOSUPPORT = 135,
        EPROTOTYPE = 136,
        ETIME = 137,
        ETIMEDOUT = 138,
        ETXTBSY = 139,
        EWOULDBLOCK = 140,
    }

    public enum EVENTSECURITYOPERATION : int
    {
        EventSecuritySetDACL = 0,
        EventSecuritySetSACL = 1,
        EventSecurityAddDACL = 2,
        EventSecurityAddSACL = 3,
        EventSecurityMax = 4,
    }

    [Flags]
    public enum EventAccessRights : uint
    {
        EVENT_MODIFY_STATE = 0x0002,
        EVENT_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    public enum EventActivityControlCode : uint
    {
        EVENT_ACTIVITY_CTRL_GET_ID = 1,
        EVENT_ACTIVITY_CTRL_SET_ID = 2,
        EVENT_ACTIVITY_CTRL_CREATE_ID = 3,
        EVENT_ACTIVITY_CTRL_GET_SET_ID = 4,
        EVENT_ACTIVITY_CTRL_CREATE_SET_ID = 5,
    }

    public enum EventControlCode : uint
    {
        EVENT_CONTROL_CODE_DISABLE_PROVIDER = 0,
        EVENT_CONTROL_CODE_ENABLE_PROVIDER = 1,
        EVENT_CONTROL_CODE_CAPTURE_STATE = 2,
    }

    [Flags]
    public enum ExitWindowsFlags : uint
    {
        EWX_LOGOFF = 0,
        EWX_SHUTDOWN = 0x00000001,
        EWX_REBOOT = 0x00000002,
        EWX_FORCE = 0x00000004,
        EWX_POWEROFF = 0x00000008,
        EWX_FORCEIFHUNG = 0x00000010,
        EWX_QUICKRESOLVE = 0x00000020,
        EWX_RESTARTAPPS = 0x00000040,
    }

    public enum EXTENDED_NAME_FORMAT : int
    {
        NameUnknown = 0,
        NameFullyQualifiedDN = 1,
        NameSamCompatible = 2,
        NameDisplay = 3,
        NameUniqueId = 6,
        NameCanonical = 7,
        NameUserPrincipal = 8,
        NameCanonicalEx = 9,
        NameServicePrincipal = 10,
        NameDnsDomain = 12,
    }
    
    [Flags]
    public enum ExtendedWindowStyles : uint
    {
        /// <summary>
        /// Specifies that a window created with this style accepts drag-drop files.
        /// </summary>
        WS_EX_ACCEPTFILES = 0x00000010,
        /// <summary>
        /// Forces a top-level window onto the taskbar when the window is visible.
        /// </summary>
        WS_EX_APPWINDOW = 0x00040000,
        /// <summary>
        /// Specifies that a window has a border with a sunken edge.
        /// </summary>
        WS_EX_CLIENTEDGE = 0x00000200,
        /// <summary>
        /// Windows XP: Paints all descendants of a window in bottom-to-top painting order using double-buffering. For more information, see Remarks. This cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC. 
        /// </summary>
        WS_EX_COMPOSITED = 0x02000000,
        /// <summary>
        /// Includes a question mark in the title bar of the window. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message. The child window should pass the message to the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the child window.
        /// WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles.
        /// </summary>
        WS_EX_CONTEXTHELP = 0x00000400,
        /// <summary>
        /// The window itself contains child windows that should take part in dialog box navigation. If this style is specified, the dialog manager recurses into children of this window when performing navigation operations such as handling the TAB key, an arrow key, or a keyboard mnemonic.
        /// </summary>
        WS_EX_CONTROLPARENT = 0x00010000,
        /// <summary>
        /// Creates a window that has a double border; the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the dwStyle parameter.
        /// </summary>
        WS_EX_DLGMODALFRAME = 0x00000001,
        /// <summary>
        /// Windows 2000/XP: Creates a layered window. Note that this cannot be used for child windows. Also, this cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC. 
        /// </summary>
        WS_EX_LAYERED = 0x00080000,
        /// <summary>
        /// Arabic and Hebrew versions of Windows 98/Me, Windows 2000/XP: Creates a window whose horizontal origin is on the right edge. Increasing horizontal values advance to the left. 
        /// </summary>
        WS_EX_LAYOUTRTL = 0x00400000,
        /// <summary>
        /// Creates a window that has generic left-aligned properties. This is the default.
        /// </summary>
        WS_EX_LEFT = 0x00000000,
        /// <summary>
        /// If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored.
        /// </summary>
        WS_EX_LEFTSCROLLBAR = 0x00004000,
        /// <summary>
        /// The window text is displayed using left-to-right reading-order properties. This is the default.
        /// </summary>
        WS_EX_LTRREADING = 0x00000000,
        /// <summary>
        /// Creates a multiple-document interface (MDI) child window.
        /// </summary>
        WS_EX_MDICHILD = 0x00000040,
        /// <summary>
        /// Windows 2000/XP: A top-level window created with this style does not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window. 
        /// To activate the window, use the SetActiveWindow or SetForegroundWindow function.
        /// The window does not appear on the taskbar by default. To force the window to appear on the taskbar, use the WS_EX_APPWINDOW style.
        /// </summary>
        WS_EX_NOACTIVATE = 0x08000000,
        /// <summary>
        /// Windows 2000/XP: A window created with this style does not pass its window layout to its child windows.
        /// </summary>
        WS_EX_NOINHERITLAYOUT = 0x00100000,
        /// <summary>
        /// Specifies that a child window created with this style does not send the WM_PARENTNOTIFY message to its parent window when it is created or destroyed.
        /// </summary>
        WS_EX_NOPARENTNOTIFY = 0x00000004,
        /// <summary>
        /// Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles.
        /// </summary>
        WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
        /// <summary>
        /// Combines the WS_EX_WINDOWEDGE, WS_EX_TOOLWINDOW, and WS_EX_TOPMOST styles.
        /// </summary>
        WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
        /// <summary>
        /// The window has generic "right-aligned" properties. This depends on the window class. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading-order alignment; otherwise, the style is ignored.
        /// Using the WS_EX_RIGHT style for static or edit controls has the same effect as using the SS_RIGHT or ES_RIGHT style, respectively. Using this style with button controls has the same effect as using BS_RIGHT and BS_RIGHTBUTTON styles.
        /// </summary>
        WS_EX_RIGHT = 0x00001000,
        /// <summary>
        /// Vertical scroll bar (if present) is to the right of the client area. This is the default.
        /// </summary>
        WS_EX_RIGHTSCROLLBAR = 0x00000000,
        /// <summary>
        /// If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the window text is displayed using right-to-left reading-order properties. For other languages, the style is ignored.
        /// </summary>
        WS_EX_RTLREADING = 0x00002000,
        /// <summary>
        /// Creates a window with a three-dimensional border style intended to be used for items that do not accept user input.
        /// </summary>
        WS_EX_STATICEDGE = 0x00020000,
        /// <summary>
        /// Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE. 
        /// </summary>
        WS_EX_TOOLWINDOW = 0x00000080,
        /// <summary>
        /// Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated. To add or remove this style, use the SetWindowPos function.
        /// </summary>
        WS_EX_TOPMOST = 0x00000008,
        /// <summary>
        /// Specifies that a window created with this style should not be painted until siblings beneath the window (that were created by the same thread) have been painted. The window appears transparent because the bits of underlying sibling windows have already been painted.
        /// To achieve transparency without these restrictions, use the SetWindowRgn function.
        /// </summary>
        WS_EX_TRANSPARENT = 0x00000020,
        /// <summary>
        /// Specifies that a window has a border with a raised edge.
        /// </summary>
        WS_EX_WINDOWEDGE = 0x00000100,
    }

    public enum FDAP : int
    {
        FDAP_BOTTOM = 0,
        FDAP_TOP = 1,
    }

    public enum FDE_OVERWRITE_RESPONSE : int
    {
        FDEOR_DEFAULT = 0,
        FDEOR_ACCEPT = 1,
        FDEOR_REFUSE = 2,
    }

    public enum FDE_SHAREVIOLATION_RESPONSE : int
    {
        FDESVR_DEFAULT = 0,
        FDESVR_ACCEPT = 1,
        FDESVR_REFUSE = 2,
    }

    [Flags]
    public enum FlashWindowFlags : uint
    {
        FLASHW_STOP = 0,
        FLASHW_CAPTION = 0x00000001,
        FLASHW_TRAY = 0x00000002,
        FLASHW_ALL = (FLASHW_CAPTION | FLASHW_TRAY),
        FLASHW_TIMER = 0x00000004,
        FLASHW_TIMERNOFG = 0x0000000C,
    }

    [Flags]
    public enum FormatMessageFlags : uint
    {
        FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100,
        FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200,
        FORMAT_MESSAGE_FROM_STRING = 0x00000400,
        FORMAT_MESSAGE_FROM_HMODULE = 0x00000800,
        FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000,
        FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000,
        FORMAT_MESSAGE_MAX_WIDTH_MASK = 0x000000FF,
    }

    [Flags]
    public enum FileAccessRights : uint
    {
        ReadData = 0x1,
        ListDirectory = 0x1,
        WriteData = 0x2,
        AddFile = 0x2,
        AppendData = 0x4,
        AddSubDirectory = 0x4,
        CreatePipeInstance = 0x4,
        ReadExtendedAttributes = 0x8,
        WriteExtendedAttributes = 0x10,
        Execute = 0x20,
        Traverse = 0x20,
        DeleteChild = 0x40,
        ReadAttributes = 0x80,
        WriteAttributes = 0x100,

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    /// <summary>
    /// Winbase.h
    /// </summary>
    public enum FileCreationDisposition : uint
    {
        CreateNew = 1,
        CreateAlways = 2,
        OpenExisting = 3,
        OpenAlways = 4,
        TruncateExisting = 5,
        OpenForLoader = 6,
    }

    [Flags]
    public enum FileFlagsAndAttributes : uint
    {
        Failure = 0xFFFFFFFF,

        // Attributes.
        FILE_ATTRIBUTE_READONLY = 0x00000001,
        FILE_ATTRIBUTE_HIDDEN = 0x00000002,
        FILE_ATTRIBUTE_SYSTEM = 0x00000004,
        FILE_ATTRIBUTE_DIRECTORY = 0x00000010,
        FILE_ATTRIBUTE_ARCHIVE = 0x00000020,
        FILE_ATTRIBUTE_DEVICE = 0x00000040,
        FILE_ATTRIBUTE_NORMAL = 0x00000080,
        FILE_ATTRIBUTE_TEMPORARY = 0x00000100,
        FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200,
        FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400,
        FILE_ATTRIBUTE_COMPRESSED = 0x00000800,
        FILE_ATTRIBUTE_OFFLINE = 0x00001000,
        FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000,
        FILE_ATTRIBUTE_ENCRYPTED = 0x00004000,
        FILE_ATTRIBUTE_VIRTUAL = 0x00010000,

        FILE_FLAG_WRITE_THROUGH = 0x80000000,
        FILE_FLAG_OVERLAPPED = 0x40000000,
        FILE_FLAG_NO_BUFFERING = 0x20000000,
        FILE_FLAG_RANDOM_ACCESS = 0x10000000,
        FILE_FLAG_SEQUENTIAL_SCAN = 0x08000000,
        FILE_FLAG_DELETE_ON_CLOSE = 0x04000000,
        FILE_FLAG_BACKUP_SEMANTICS = 0x02000000,
        FILE_FLAG_POSIX_SEMANTICS = 0x01000000,
        FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000,
        FILE_FLAG_OPEN_NO_RECALL = 0x00100000,
        FILE_FLAG_FIRST_PIPE_INSTANCE = 0x00080000,

        // See documentation for CreateFileTransacted().
        SECURITY_ANONYMOUS = (SECURITY_IMPERSONATION_LEVEL.SecurityAnonymous << 16),
        SECURITY_IDENTIFICATION = (SECURITY_IMPERSONATION_LEVEL.SecurityIdentification << 16),
        SECURITY_IMPERSONATION = (SECURITY_IMPERSONATION_LEVEL.SecurityImpersonation << 16),
        SECURITY_DELEGATION = (SECURITY_IMPERSONATION_LEVEL.SecurityDelegation << 16),
        SECURITY_CONTEXT_TRACKING = 0x00040000,
        SECURITY_EFFECTIVE_ONLY = 0x00080000,
        SECURITY_SQOS_PRESENT = 0x00100000,
        SECURITY_VALID_SQOS_FLAGS = 0x001F0000,
    }

    public enum FILE_ID_TYPE : int
    {
        FileIdType = 0,
        ObjectIdType = 1,
        MaximumFileIdType = 2,
    }

    [Flags]
    public enum FILEOPENDIALOGOPTIONS : uint
    {
        FOS_OVERWRITEPROMPT = 0x2,
        FOS_STRICTFILETYPES = 0x4,
        FOS_NOCHANGEDIR = 0x8,
        FOS_PICKFOLDERS = 0x20,
        FOS_FORCEFILESYSTEM = 0x40,
        FOS_ALLNONSTORAGEITEMS = 0x80,
        FOS_NOVALIDATE = 0x100,
        FOS_ALLOWMULTISELECT = 0x200,
        FOS_PATHMUSTEXIST = 0x800,
        FOS_FILEMUSTEXIST = 0x1000,
        FOS_CREATEPROMPT = 0x2000,
        FOS_SHAREAWARE = 0x4000,
        FOS_NOREADONLYRETURN = 0x8000,
        FOS_NOTESTFILECREATE = 0x10000,
        FOS_HIDEMRUPLACES = 0x20000,
        FOS_HIDEPINNEDPLACES = 0x40000,
        FOS_NODEREFERENCELINKS = 0x100000,
        FOS_DONTADDTORECENT = 0x2000000,
        FOS_FORCESHOWHIDDEN = 0x10000000,
        FOS_DEFAULTNOMINIMODE = 0x20000000,
        FOS_FORCEPREVIEWPANEON = 0x40000000,
    }

    [Flags]
    public enum FILEOP_FLAGS : ushort
    {
        FOF_MULTIDESTFILES = 0x0001,
        FOF_CONFIRMMOUSE = 0x0002,
        FOF_SILENT = 0x0004,  // don't display progress UI (confirm prompts may be displayed still)
        FOF_RENAMEONCOLLISION = 0x0008,  // automatically rename the source files to avoid the collisions
        FOF_NOCONFIRMATION = 0x0010,  // don't display confirmation UI, assume "yes" for cases that can be bypassed, "no" for those that can not
        FOF_WANTMAPPINGHANDLE = 0x0020,  // Fill in SHFILEOPSTRUCT.hNameMappings
        // Must be freed using SHFreeNameMappings
        FOF_ALLOWUNDO = 0x0040,  // enable undo including Recycle behavior for IFileOperation::Delete()
        FOF_FILESONLY = 0x0080,  // only operate on the files (non folders), both files and folders are assumed without this
        FOF_SIMPLEPROGRESS = 0x0100,  // means don't show names of files
        FOF_NOCONFIRMMKDIR = 0x0200,  // don't dispplay confirmatino UI before making any needed directories, assume "Yes" in these cases
        FOF_NOERRORUI = 0x0400,  // don't put up error UI, other UI may be displayed, progress, confirmations
        FOF_NOCOPYSECURITYATTRIBS = 0x0800,  // dont copy file security attributes (ACLs)
        FOF_NORECURSION = 0x1000,  // don't recurse into directories for operations that would recurse
        FOF_NO_CONNECTED_ELEMENTS = 0x2000,  // don't operate on connected elements ("xxx_files" folders that go with .htm files)
        FOF_WANTNUKEWARNING = 0x4000,  // during delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)
        FOF_NORECURSEREPARSE = 0x8000,  // deprecated; the operations engine always does the right thing on FolderLink objects (symlinks, reparse points, folder shortcuts)
        FOF_NO_UI = (FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR), // don't display any UI at all
    }

    public enum FilePointerMoveMethod : uint
    {
        Beginning = 0,
        Current = 1,
        End = 2,
    }

    [Flags]
    public enum FileShareMode : uint
    {
        FILE_SHARE_READ = 0x00000001,
        FILE_SHARE_WRITE = 0x00000002,
        FILE_SHARE_DELETE = 0x00000004,
    }

    public enum FileType : uint
    {
        FILE_TYPE_UNKNOWN = 0x0000,
        FILE_TYPE_DISK = 0x0001,
        FILE_TYPE_CHAR = 0x0002,
        FILE_TYPE_PIPE = 0x0003,
        FILE_TYPE_REMOTE = 0x8000,
    }

    public enum GetCommandStringCode : uint
    {
        GCS_VERBA = 0x00000000,
        GCS_HELPTEXTA = 0x00000001,
        GCS_VALIDATEA = 0x00000002,
        GCS_VERBW = 0x00000004,
        GCS_HELPTEXTW = 0x00000005,
        GCS_VALIDATEW = 0x00000006,
        GCS_VERBICONW = 0x00000014,
    }

    public enum GET_FILEEX_INFO_LEVELS : int
    {
        GetFileExInfoStandard = 0,
        GetFileExMaxInfoLevel = 1,
    }

    public enum GetGuiResourcesCode : uint
    {
        /// <summary>Return the count of GDI objects.</summary>
        GR_GDIOBJECTS = 0,
        /// <summary>Return the count of USER objects.</summary>
        GR_USEROBJECTS = 1,
        /// <summary>Return the peak count of GDI objects.</summary>
        GR_GDIOBJECTS_PEAK = 2,
        /// <summary>Return the peak count of USER objects.</summary>
        GR_USEROBJECTS_PEAK = 4,
    }

    [Flags]
    public enum GetModuleHandleExFlags : uint
    {
        /// <summary>The module stays loaded until the process is terminated, no matter how many times FreeLibrary is called.
        /// This option cannot be used with GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT.</summary>
        GET_MODULE_HANDLE_EX_FLAG_PIN = 0x00000001,
        /// <summary>The reference count for the module is not incremented. This option is equivalent to the behavior of GetModuleHandle.
        /// Do not pass the retrieved module handle to the FreeLibrary function; doing so can cause the DLL to be unmapped prematurely.
        /// This option cannot be used with GET_MODULE_HANDLE_EX_FLAG_PIN.</summary>
        GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = 0x00000002,
        /// <summary>The lpModuleName parameter is an address in the module.</summary>
        GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = 0x00000004,
    }

    [Flags]
    public enum GETPROPERTYSTOREFLAGS : int
    {
        GPS_DEFAULT = 0,
        GPS_HANDLERPROPERTIESONLY = 0x1,
        GPS_READWRITE = 0x2,
        GPS_TEMPORARY = 0x4,
        GPS_FASTPROPERTIESONLY = 0x8,
        GPS_OPENSLOWITEM = 0x10,
        GPS_DELAYCREATION = 0x20,
        GPS_BESTEFFORT = 0x40,
        GPS_NO_OPLOCK = 0x80,
        //GPS_MASK_VALID	= 0xff
    }

    [Flags]
    public enum HandleInformationFlags : uint
    {
        HANDLE_FLAG_INHERIT = 0x00000001,
        HANDLE_FLAG_PROTECT_FROM_CLOSE = 0x00000002,
    }

    public enum HEAP_INFORMATION_CLASS : int
    {
        HeapCompatibilityInformation = 0,
        HeapEnableTerminationOnCorruption = 1,
    }

    [Flags]
    public enum HeapFlags : uint
    {
        HEAP_NO_SERIALIZE = 0x00000001,
        HEAP_GROWABLE = 0x00000002,
        HEAP_GENERATE_EXCEPTIONS = 0x00000004,
        HEAP_ZERO_MEMORY = 0x00000008,
        HEAP_REALLOC_IN_PLACE_ONLY = 0x00000010,
        HEAP_TAIL_CHECKING_ENABLED = 0x00000020,
        HEAP_FREE_CHECKING_ENABLED = 0x00000040,
        HEAP_DISABLE_COALESCE_ON_FREE = 0x00000080,
        HEAP_CREATE_ALIGN_16 = 0x00010000,
        HEAP_CREATE_ENABLE_TRACING = 0x00020000,
        HEAP_CREATE_ENABLE_EXECUTE = 0x00040000,
    }

    public enum HookCode : int
    {
        HC_ACTION = 0,
        HC_GETNEXT = 1,
        HC_SKIP = 2,
        HC_NOREMOVE = 3,
        HC_SYSMODALON = 4,
        HC_SYSMODALOFF = 5,
    }

    public enum HookId : int
    {
        WH_MSGFILTER = -1,
        WH_JOURNALRECORD = 0,
        WH_JOURNALPLAYBACK = 1,
        WH_KEYBOARD = 2,
        WH_GETMESSAGE = 3,
        WH_CALLWNDPROC = 4,
        WH_CBT = 5,
        WH_SYSMSGFILTER = 6,
        WH_MOUSE = 7,
        WH_HARDWARE = 8,
        WH_DEBUG = 9,
        WH_SHELL = 10,
        WH_FOREGROUNDIDLE = 11,
        WH_CALLWNDPROCRET = 12,
        WH_KEYBOARD_LL = 13,
        WH_MOUSE_LL = 14,
    }

    [Flags]
    public enum HotKeyModifiers : uint
    {
        MOD_ALT = 0x0001,
        MOD_CONTROL = 0x0002,
        MOD_SHIFT = 0x0004,
        MOD_IGNORE_ALL_MODIFIER = 0x0400,
        MOD_ON_KEYUP = 0x0800,
        MOD_RIGHT = 0x4000,
        MOD_LEFT = 0x8000,
    }

    public enum IP_STATUS : uint
    {
        IP_STATUS_BASE = 11000,

        IP_SUCCESS = 0,
        IP_BUF_TOO_SMALL = (IP_STATUS_BASE + 1),
        IP_DEST_NET_UNREACHABLE = (IP_STATUS_BASE + 2),
        IP_DEST_HOST_UNREACHABLE = (IP_STATUS_BASE + 3),
        IP_DEST_PROT_UNREACHABLE = (IP_STATUS_BASE + 4),
        IP_DEST_PORT_UNREACHABLE = (IP_STATUS_BASE + 5),
        IP_NO_RESOURCES = (IP_STATUS_BASE + 6),
        IP_BAD_OPTION = (IP_STATUS_BASE + 7),
        IP_HW_ERROR = (IP_STATUS_BASE + 8),
        IP_PACKET_TOO_BIG = (IP_STATUS_BASE + 9),
        IP_REQ_TIMED_OUT = (IP_STATUS_BASE + 10),
        IP_BAD_REQ = (IP_STATUS_BASE + 11),
        IP_BAD_ROUTE = (IP_STATUS_BASE + 12),
        IP_TTL_EXPIRED_TRANSIT = (IP_STATUS_BASE + 13),
        IP_TTL_EXPIRED_REASSEM = (IP_STATUS_BASE + 14),
        IP_PARAM_PROBLEM = (IP_STATUS_BASE + 15),
        IP_SOURCE_QUENCH = (IP_STATUS_BASE + 16),
        IP_OPTION_TOO_BIG = (IP_STATUS_BASE + 17),
        IP_BAD_DESTINATION = (IP_STATUS_BASE + 18),

        // Variants of the above using IPv6 terminology, where different
        IP_DEST_NO_ROUTE = (IP_STATUS_BASE + 2),
        IP_DEST_ADDR_UNREACHABLE = (IP_STATUS_BASE + 3),
        IP_DEST_PROHIBITED = (IP_STATUS_BASE + 4),
        //IP_DEST_PORT_UNREACHABLE = (IP_STATUS_BASE + 5),
        IP_HOP_LIMIT_EXCEEDED = (IP_STATUS_BASE + 13),
        IP_REASSEMBLY_TIME_EXCEEDED = (IP_STATUS_BASE + 14),
        IP_PARAMETER_PROBLEM = (IP_STATUS_BASE + 15),

        // IPv6-only status codes
        IP_DEST_UNREACHABLE = (IP_STATUS_BASE + 40),
        IP_TIME_EXCEEDED = (IP_STATUS_BASE + 41),
        IP_BAD_HEADER = (IP_STATUS_BASE + 42),
        IP_UNRECOGNIZED_NEXT_HEADER = (IP_STATUS_BASE + 43),
        IP_ICMP_ERROR = (IP_STATUS_BASE + 44),
        IP_DEST_SCOPE_MISMATCH = (IP_STATUS_BASE + 45),

        // The next group are status codes passed up on status indications to
        // transport layer protocols.
        IP_ADDR_DELETED = (IP_STATUS_BASE + 19),
        IP_SPEC_MTU_CHANGE = (IP_STATUS_BASE + 20),
        IP_MTU_CHANGE = (IP_STATUS_BASE + 21),
        IP_UNLOAD = (IP_STATUS_BASE + 22),
        IP_ADDR_ADDED = (IP_STATUS_BASE + 23),
        IP_MEDIA_CONNECT = (IP_STATUS_BASE + 24),
        IP_MEDIA_DISCONNECT = (IP_STATUS_BASE + 25),
        IP_BIND_ADAPTER = (IP_STATUS_BASE + 26),
        IP_UNBIND_ADAPTER = (IP_STATUS_BASE + 27),
        IP_DEVICE_DOES_NOT_EXIST = (IP_STATUS_BASE + 28),
        IP_DUPLICATE_ADDRESS = (IP_STATUS_BASE + 29),
        IP_INTERFACE_METRIC_CHANGE = (IP_STATUS_BASE + 30),
        IP_RECONFIG_SECFLTR = (IP_STATUS_BASE + 31),
        IP_NEGOTIATING_IPSEC = (IP_STATUS_BASE + 32),
        IP_INTERFACE_WOL_CAPABILITY_CHANGE = (IP_STATUS_BASE + 33),
        IP_DUPLICATE_IPADD = (IP_STATUS_BASE + 34),

        IP_GENERAL_FAILURE = (IP_STATUS_BASE + 50),
        MAX_IP_STATUS = IP_GENERAL_FAILURE,
        IP_PENDING = (IP_STATUS_BASE + 255),
    }

    [Flags]
    public enum IpOptionInformationFlags : byte
    {
        IP_FLAG_REVERSE = 0x01,
        IP_FLAG_DF = 0x02,
    }

    /// <summary>
    /// These codes are used by the SHLWAPI IsOS() function.
    /// </summary>
    public enum IsOSCode : uint
    {
        OS_WINDOWS = 0, // Windows 9x vs. NT
        OS_NT = 1, // Windows 9x vs. NT
        OS_WIN95ORGREATER = 2, // Win95 or greater
        OS_NT4ORGREATER = 3, // NT4 or greater
        OS_WIN98ORGREATER = 5, // Win98 or greater
        OS_WIN98_GOLD = 6, // Win98 Gold (Version 4.10 build 1998)
        OS_WIN2000ORGREATER = 7, // Some derivative of Win2000

        // NOTE: these flags check explicitly for (dwMajorVersion == 5)
        OS_WIN2000PRO = 8, // Windows 2000 Professional (Workstation)
        OS_WIN2000SERVER = 9, // Windows 2000 Server
        OS_WIN2000ADVSERVER = 10, // Windows 2000 Advanced Server
        OS_WIN2000DATACENTER = 11, // Windows 2000 Data Center Server
        OS_WIN2000TERMINAL = 12, // Windows 2000 Terminal Server in "Application Server" mode (now simply called "Terminal Server")

        OS_EMBEDDED = 13, // Embedded Windows Edition
        OS_TERMINALCLIENT = 14, // Windows Terminal Client (eg user is comming in via tsclient)
        OS_TERMINALREMOTEADMIN = 15, // Terminal Server in "Remote Administration" mode
        OS_WIN95_GOLD = 16, // Windows 95 Gold (Version 4.0 Build 1995)
        OS_MEORGREATER = 17, // Windows Millennium (Version 5.0)
        OS_XPORGREATER = 18, // Windows XP or greater
        OS_HOME = 19, // Home Edition (eg NOT Professional, Server, Advanced Server, or Datacenter)
        OS_PROFESSIONAL = 20, // Professional     (aka Workstation; eg NOT Server, Advanced Server, or Datacenter)
        OS_DATACENTER = 21, // Datacenter       (eg NOT Server, Advanced Server, Professional, or Personal)
        OS_ADVSERVER = 22, // Advanced Server  (eg NOT Datacenter, Server, Professional, or Personal)
        OS_SERVER = 23, // Server           (eg NOT Datacenter, Advanced Server, Professional, or Personal)
        OS_TERMINALSERVER = 24, // Terminal Server - server running in what used to be called "Application Server" mode (now simply called "Terminal Server")
        OS_PERSONALTERMINALSERVER = 25, // Personal Terminal Server - per/pro machine running in single user TS mode
        OS_FASTUSERSWITCHING = 26, // Fast User Switching
        OS_WELCOMELOGONUI = 27, // New friendly logon UI
        OS_DOMAINMEMBER = 28, // Is this machine a member of a domain (eg NOT a workgroup)
        OS_ANYSERVER = 29, // is this machine any type of server? (eg datacenter or advanced server or server)?
        OS_WOW6432 = 30, // Is this process a 32-bit process running on an 64-bit platform?
        OS_WEBSERVER = 31, // Web Edition Server
        OS_SMALLBUSINESSSERVER = 32, // SBS Server
        OS_TABLETPC = 33, // Are we running on a TabletPC?
        OS_SERVERADMINUI = 34, // Should defaults lean towards those preferred by server administrators?
        OS_MEDIACENTER = 35, // eHome Freestyle Project
        OS_APPLIANCE = 36, // Windows .NET Appliance Server
    }

    public enum LANGID : ushort
    {
    }

    /// <summary>
    /// TODO: Add to this enum as more are needed/discovered.
    /// http://msdn.microsoft.com/en-us/library/dd464799(v=VS.85).aspx
    /// </summary>
    public enum LCID : uint
    {
        LOCALE_CUSTOM_DEFAULT = 0x0C00,
        LOCALE_CUSTOM_UI_DEFAULT = 0x1400,
        LOCALE_CUSTOM_UNSPECIFIED = 0x1000,
        LOCALE_INVARIANT = 0x007f,
        LOCALE_NEUTRAL = 0x0000,
        LOCALE_SYSTEM_DEFAULT = 0x0800,
        LOCALE_USER_DEFAULT = 0x0400,
    }

    [Flags]
    public enum LoadLibraryExFlags : uint
    {
        DONT_RESOLVE_DLL_REFERENCES = 0x00000001,
        LOAD_LIBRARY_AS_DATAFILE = 0x00000002,
        LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008,
        LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x00000010,
        LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x00000020,
        LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x00000040,
        LOAD_LIBRARY_REQUIRE_SIGNED_TARGET = 0x00000080,
    }

    /// <summary>
    /// Locale Dependent Mapping Flags.
    /// </summary>
    [Flags]
    public enum LocaleMappingFlags : uint
    {
        LCMAP_LOWERCASE = 0x00000100, // lower case letters
        LCMAP_UPPERCASE = 0x00000200, // UPPER CASE LETTERS
        LCMAP_TITLECASE = 0x00000300, // Title Case Letters
        LCMAP_SORTKEY = 0x00000400, // WC sort key (normalize)
        LCMAP_BYTEREV = 0x00000800, // byte reversal
        LCMAP_HIRAGANA = 0x00100000, // map katakana to hiragana
        LCMAP_KATAKANA = 0x00200000, // map hiragana to katakana
        LCMAP_HALFWIDTH = 0x00400000, // map double byte to single byte
        LCMAP_FULLWIDTH = 0x00800000, // map single byte to double byte
        LCMAP_LINGUISTIC_CASING = 0x01000000, // use linguistic rules for casing
        LCMAP_SIMPLIFIED_CHINESE = 0x02000000, // map traditional chinese to simplified chinese
        LCMAP_TRADITIONAL_CHINESE = 0x04000000, // map simplified chinese to traditional chinese
    }

    [Flags]
    public enum GestureConfigFlags : uint
    {
        GCF_INCLUDE_ANCESTORS = 0x00000001
    }

    [Flags]
    public enum GestureFlags : uint
    {
        GF_BEGIN = 0x00000001,
        GF_INERTIA = 0x00000002,
        GF_END = 0x00000004,
    }

    public enum GestureId : uint
    {
        GID_BEGIN = 1,
        GID_END = 2,
        GID_ZOOM = 3,
        GID_PAN = 4,
        GID_ROTATE = 5,
        GID_TWOFINGERTAP = 6,
        GID_PRESSANDTAP = 7,
        GID_ROLLOVER = GID_PRESSANDTAP,
    }

    public enum GetAncestorCode : uint
    {
        /// <summary>Retrieves the parent window. This does not include the owner, as it does with the GetParent function.</summary>
        GA_PARENT = 1,
        /// <summary>Retrieves the root window by walking the chain of parent windows.</summary>
        GA_ROOT = 2,
        /// <summary>Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent.</summary>
        GA_ROOTOWNER = 3,
    }

    [Flags]
    public enum GetMenuDefaultItemFlags
    {
        GMDI_USEDISABLED = 0x0001,
        GMDI_GOINTOPOPUPS = 0x0002,
    }

    public enum GetWindowCode : uint
    {
        GW_HWNDFIRST = 0,
        GW_HWNDLAST = 1,
        GW_HWNDNEXT = 2,
        GW_HWNDPREV = 3,
        GW_OWNER = 4,
        GW_CHILD = 5,
        GW_ENABLEDPOPUP = 6,
    }

    /// <summary>Options available when a form is tested for mouse positions.</summary>
    public enum HitTestCode : int
    {
        /// <summary>On the screen background or on a dividing line between windows 
        /// (same as HTNOWHERE, except that the DefWindowProc function produces a system 
        /// beep to indicate an error).</summary>
        HTERROR = -2,
        /// <summary>In a window currently covered by another window in the 
        /// same thread (the message will be sent to underlying windows in the same thread 
        /// until one of them returns a code that is not HTTRANSPARENT).</summary>
        HTTRANSPARENT = -1,
        /// <summary>On the screen background or on a dividing line between 
        /// windows.</summary>
        HTNOWHERE = 0,
        /// <summary>HTCLIENT: In a client area.</summary>
        HTCLIENT = 1,
        /// <summary>HTCAPTION: In a title bar.</summary>
        HTCAPTION = 2,
        /// <summary>HTSYSMENU: In a window menu or in a Close button in a child window.</summary>
        HTSYSMENU = 3,
        /// <summary>HTGROWBOX: In a size box (same as HTSIZE).</summary>
        HTGROWBOX = 4,
        /// <summary>HTMENU: In a menu.</summary>
        HTMENU = 5,
        /// <summary>HTHSCROLL: In a horizontal scroll bar.</summary>
        HTHSCROLL = 6,
        /// <summary>HTVSCROLL: In the vertical scroll bar.</summary>
        HTVSCROLL = 7,
        /// <summary>HTMINBUTTON: In a Minimize button. </summary>
        HTMINBUTTON = 8,
        /// <summary>HTMAXBUTTON: In a Maximize button.</summary>
        HTMAXBUTTON = 9,
        /// <summary>In the left border of a resizable window (the user can click 
        /// the mouse to resize the window horizontally).</summary>
        HTLEFT = 10,
        /// <summary>In the right border of a resizable window (the user can click 
        /// the mouse to resize the window horizontally).</summary>
        HTRIGHT = 11,
        /// <summary>HTTOP: In the upper-horizontal border of a window.</summary>
        HTTOP = 12,
        /// <summary>HTTOPLEFT: In the upper-left corner of a window border.</summary>
        HTTOPLEFT = 13,
        /// <summary>HTTOPRIGHT: In the upper-right corner of a window border.</summary>
        HTTOPRIGHT = 14,
        /// <summary>In the lower-horizontal border of a resizable window (the 
        /// user can click the mouse to resize the window vertically).</summary>
        HTBOTTOM = 15,
        /// <summary>HTBOTTOMLEFT: In the lower-left corner of a border of a resizable 
        /// window (the user can click the mouse to resize the window diagonally).</summary>
        HTBOTTOMLEFT = 16,
        /// <summary>HTBOTTOMRIGHT: In the lower-right corner of a border of a resizable 
        /// window (the user can click the mouse to resize the window diagonally).</summary>
        HTBOTTOMRIGHT = 17,
        /// <summary>HTBORDER: In the border of a window that does not have a sizing 
        /// border.</summary>
        HTBORDER = 18,
        /// <summary>HTOBJECT: Unknown...No Documentation Found</summary>
        HTOBJECT = 19,
        /// <summary>HTCLOSE: In a Close button.</summary>
        HTCLOSE = 20,
        /// <summary>HTHELP: In a Help button.</summary>
        HTHELP = 21,
        /// <summary>HTSIZE: In a size box (same as HTGROWBOX). (Same as GrowBox).</summary>
        HTSIZE = HTGROWBOX,
        /// <summary>In a Minimize button. (Same as MinimizeButton).</summary>
        HTREDUCE = HTMINBUTTON,
        /// <summary>In a Maximize button. (Same as MaximizeButton).</summary>
        HTZOOM = HTMAXBUTTON,
    }

    public enum IMAGE_DIRECTORY_ENTRY : ushort
    {
        IMAGE_DIRECTORY_ENTRY_EXPORT = 0,// Export Directory
        IMAGE_DIRECTORY_ENTRY_IMPORT = 1,// Import Directory
        IMAGE_DIRECTORY_ENTRY_RESOURCE = 2,// Resource Directory
        IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3,// Exception Directory
        IMAGE_DIRECTORY_ENTRY_SECURITY = 4,// Security Directory
        IMAGE_DIRECTORY_ENTRY_BASERELOC = 5,// Base Relocation Table
        IMAGE_DIRECTORY_ENTRY_DEBUG = 6,// Debug Directory
        IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7,// Architecture Specific Data
        IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8,// RVA of GP
        IMAGE_DIRECTORY_ENTRY_TLS = 9,// TLS Directory
        IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10,// Load Configuration Directory
        IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11,// Bound Import Directory in headers
        IMAGE_DIRECTORY_ENTRY_IAT = 12,// Import Address Table
        IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13,// Delay Load Import Descriptors
        IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14,// COM Runtime descriptor
    }

    [Flags]
    public enum IMAGE_SCN : uint
    {
        IMAGE_SCN_TYPE_REG = 0x00000000,  // Reserved.
        IMAGE_SCN_TYPE_DSECT = 0x00000001,  // Reserved.
        IMAGE_SCN_TYPE_NOLOAD = 0x00000002,  // Reserved.
        IMAGE_SCN_TYPE_GROUP = 0x00000004, // Reserved.
        IMAGE_SCN_TYPE_NO_PAD = 0x00000008,  // Reserved.
        IMAGE_SCN_TYPE_COPY = 0x00000010, // Reserved.
        IMAGE_SCN_CNT_CODE = 0x00000020,  // Section contains code.
        IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040,  // Section contains initialized data.
        IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080,  // Section contains uninitialized data.
        IMAGE_SCN_LNK_OTHER = 0x00000100,  // Reserved.
        IMAGE_SCN_LNK_INFO = 0x00000200,  // Section contains comments or some other type of information.
        IMAGE_SCN_TYPE_OVER = 0x00000400, // Reserved.
        IMAGE_SCN_LNK_REMOVE = 0x00000800,  // Section contents will not become part of image.
        IMAGE_SCN_LNK_COMDAT = 0x00001000,  // Section contents comdat.
        IMAGE_SCN_MEM_PROTECTED = 0x00004000,
        IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000, // Reset speculative exceptions handling bits in the TLB entries for this section.
        IMAGE_SCN_GPREL = 0x00008000, // Section content can be accessed relative to GP
        IMAGE_SCN_MEM_FARDATA = 0x00008000,
        IMAGE_SCN_MEM_SYSHEAP = 0x00010000,
        IMAGE_SCN_MEM_PURGEABLE = 0x00020000,
        IMAGE_SCN_MEM_16BIT = 0x00020000,
        IMAGE_SCN_MEM_LOCKED = 0x00040000,
        IMAGE_SCN_MEM_PRELOAD = 0x00080000,
        IMAGE_SCN_ALIGN_1BYTES = 0x00100000,
        IMAGE_SCN_ALIGN_2BYTES = 0x00200000,
        IMAGE_SCN_ALIGN_4BYTES = 0x00300000,
        IMAGE_SCN_ALIGN_8BYTES = 0x00400000,
        IMAGE_SCN_ALIGN_16BYTES = 0x00500000, // Default alignment if no others are specified.
        IMAGE_SCN_ALIGN_32BYTES = 0x00600000,
        IMAGE_SCN_ALIGN_64BYTES = 0x00700000,
        IMAGE_SCN_ALIGN_128BYTES = 0x00800000,
        IMAGE_SCN_ALIGN_256BYTES = 0x00900000,
        IMAGE_SCN_ALIGN_512BYTES = 0x00A00000,
        IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000,
        IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000,
        IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000,
        IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000,
        IMAGE_SCN_ALIGN_MASK = 0x00F00000,
        IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000, // Section contains extended relocations.
        IMAGE_SCN_MEM_DISCARDABLE = 0x02000000, // Section can be discarded.
        IMAGE_SCN_MEM_NOT_CACHED = 0x04000000, // Section is not cachable.
        IMAGE_SCN_MEM_NOT_PAGED = 0x08000000, // Section is not pageable.
        IMAGE_SCN_MEM_SHARED = 0x10000000, // Section is shareable.
        IMAGE_SCN_MEM_EXECUTE = 0x20000000, // Section is executable.
        IMAGE_SCN_MEM_READ = 0x40000000, // Section is readable.
        IMAGE_SCN_MEM_WRITE = 0x80000000, // Section is writeable.
        IMAGE_SCN_SCALE_INDEX = 0x00000001, // Tls index is scaled
    }

    public enum InputType : uint
    {
        INPUT_MOUSE = 0,
        INPUT_KEYBOARD = 1,
        INPUT_HARDWARE = 2,
    }

    [Flags]
    public enum InSendMessageExFlags : uint
    {
        /// <summary>The message was sent using the SendMessage or SendMessageTimeout function. If ISMEX_REPLIED is not set, the thread that sent the message is blocked.</summary>
        ISMEX_SEND = 0x00000001,
        /// <summary>The message was sent using the SendNotifyMessage function. The thread that sent the message is not blocked.</summary>
        ISMEX_NOTIFY = 0x00000002,
        /// <summary>The message was sent using the SendMessageCallback function. The thread that sent the message is not blocked.</summary>
        ISMEX_CALLBACK = 0x00000004,
        /// <summary>The window procedure has processed the message. The thread that sent the message is no longer blocked.</summary>
        ISMEX_REPLIED = 0x00000008,
    }

    public enum INTERNETFEATURELIST
    {
        FEATURE_ZONE_ELEVATION = 1,
        FEATURE_MIME_HANDLING = 2,
        FEATURE_MIME_SNIFFING = 3,
        FEATURE_WINDOW_RESTRICTIONS = 4,
        FEATURE_WEBOC_POPUPMANAGEMENT = 5,
        FEATURE_BEHAVIORS = 6,
        FEATURE_DISABLE_MK_PROTOCOL = 7,
        FEATURE_LOCALMACHINE_LOCKDOWN = 8,
        FEATURE_SECURITYBAND = 9,
        FEATURE_RESTRICT_ACTIVEXINSTALL = 10,
        FEATURE_VALIDATE_NAVIGATE_URL = 11,
        FEATURE_RESTRICT_FILEDOWNLOAD = 12,
        FEATURE_ADDON_MANAGEMENT = 13,
        FEATURE_PROTOCOL_LOCKDOWN = 14,
        FEATURE_HTTP_USERNAME_PASSWORD_DISABLE = 15,
        FEATURE_SAFE_BINDTOOBJECT = 16,
        FEATURE_UNC_SAVEDFILECHECK = 17,
        FEATURE_GET_URL_DOM_FILEPATH_UNENCODED = 18,
        FEATURE_TABBED_BROWSING = 19,
        FEATURE_SSLUX = 20,
        FEATURE_DISABLE_NAVIGATION_SOUNDS = 21,
        FEATURE_DISABLE_LEGACY_COMPRESSION = 22,
        FEATURE_FORCE_ADDR_AND_STATUS = 23,
        FEATURE_XMLHTTP = 24,
        FEATURE_DISABLE_TELNET_PROTOCOL = 25,
        FEATURE_FEEDS = 26,
        FEATURE_BLOCK_INPUT_PROMPTS = 27,
        FEATURE_ENTRY_COUNT = 28
    }

    public enum InternetOption : uint
    {
        INTERNET_OPTION_CALLBACK = 1,
        INTERNET_OPTION_CONNECT_TIMEOUT = 2,
        INTERNET_OPTION_CONNECT_RETRIES = 3,
        INTERNET_OPTION_CONNECT_BACKOFF = 4,
        INTERNET_OPTION_SEND_TIMEOUT = 5,
        INTERNET_OPTION_CONTROL_SEND_TIMEOUT = INTERNET_OPTION_SEND_TIMEOUT,
        INTERNET_OPTION_RECEIVE_TIMEOUT = 6,
        INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT = INTERNET_OPTION_RECEIVE_TIMEOUT,
        INTERNET_OPTION_DATA_SEND_TIMEOUT = 7,
        INTERNET_OPTION_DATA_RECEIVE_TIMEOUT = 8,
        INTERNET_OPTION_HANDLE_TYPE = 9,
        INTERNET_OPTION_LISTEN_TIMEOUT = 11,
        INTERNET_OPTION_READ_BUFFER_SIZE = 12,
        INTERNET_OPTION_WRITE_BUFFER_SIZE = 13,
        INTERNET_OPTION_ASYNC_ID = 15,
        INTERNET_OPTION_ASYNC_PRIORITY = 16,
        INTERNET_OPTION_PARENT_HANDLE = 21,
        INTERNET_OPTION_KEEP_CONNECTION = 22,
        INTERNET_OPTION_REQUEST_FLAGS = 23,
        INTERNET_OPTION_EXTENDED_ERROR = 24,
        INTERNET_OPTION_OFFLINE_MODE = 26,
        INTERNET_OPTION_CACHE_STREAM_HANDLE = 27,
        INTERNET_OPTION_USERNAME = 28,
        INTERNET_OPTION_PASSWORD = 29,
        INTERNET_OPTION_ASYNC = 30,
        INTERNET_OPTION_SECURITY_FLAGS = 31,
        INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT = 32,
        INTERNET_OPTION_DATAFILE_NAME = 33,
        INTERNET_OPTION_URL = 34,
        INTERNET_OPTION_SECURITY_CERTIFICATE = 35,
        INTERNET_OPTION_SECURITY_KEY_BITNESS = 36,
        INTERNET_OPTION_REFRESH = 37,
        INTERNET_OPTION_PROXY = 38,
        INTERNET_OPTION_SETTINGS_CHANGED = 39,
        INTERNET_OPTION_VERSION = 40,
        INTERNET_OPTION_USER_AGENT = 41,
        INTERNET_OPTION_END_BROWSER_SESSION = 42,
        INTERNET_OPTION_PROXY_USERNAME = 43,
        INTERNET_OPTION_PROXY_PASSWORD = 44,
        INTERNET_OPTION_CONTEXT_VALUE = 45,
        INTERNET_OPTION_CONNECT_LIMIT = 46,
        INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT = 47,
        INTERNET_OPTION_POLICY = 48,
        INTERNET_OPTION_DISCONNECTED_TIMEOUT = 49,
        INTERNET_OPTION_CONNECTED_STATE = 50,
        INTERNET_OPTION_IDLE_STATE = 51,
        INTERNET_OPTION_OFFLINE_SEMANTICS = 52,
        INTERNET_OPTION_SECONDARY_CACHE_KEY = 53,
        INTERNET_OPTION_CALLBACK_FILTER = 54,
        INTERNET_OPTION_CONNECT_TIME = 55,
        INTERNET_OPTION_SEND_THROUGHPUT = 56,
        INTERNET_OPTION_RECEIVE_THROUGHPUT = 57,
        INTERNET_OPTION_REQUEST_PRIORITY = 58,
        INTERNET_OPTION_HTTP_VERSION = 59,
        INTERNET_OPTION_RESET_URLCACHE_SESSION = 60,
        INTERNET_OPTION_ERROR_MASK = 62,
        INTERNET_OPTION_FROM_CACHE_TIMEOUT = 63,
        INTERNET_OPTION_BYPASS_EDITED_ENTRY = 64,
        INTERNET_OPTION_HTTP_DECODING = 65,
        INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO = 67,
        INTERNET_OPTION_CODEPAGE = 68,
        INTERNET_OPTION_CACHE_TIMESTAMPS = 69,
        INTERNET_OPTION_DISABLE_AUTODIAL = 70,
        INTERNET_OPTION_MAX_CONNS_PER_SERVER = 73,
        INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER = 74,
        INTERNET_OPTION_PER_CONNECTION_OPTION = 75,
        INTERNET_OPTION_DIGEST_AUTH_UNLOAD = 76,
        INTERNET_OPTION_IGNORE_OFFLINE = 77,
        INTERNET_OPTION_IDENTITY = 78,
        INTERNET_OPTION_REMOVE_IDENTITY = 79,
        INTERNET_OPTION_ALTER_IDENTITY = 80,
        INTERNET_OPTION_SUPPRESS_BEHAVIOR = 81,
        INTERNET_OPTION_AUTODIAL_MODE = 82,
        INTERNET_OPTION_AUTODIAL_CONNECTION = 83,
        INTERNET_OPTION_CLIENT_CERT_CONTEXT = 84,
        INTERNET_OPTION_AUTH_FLAGS = 85,
        INTERNET_OPTION_COOKIES_3RD_PARTY = 86,
        INTERNET_OPTION_DISABLE_PASSPORT_AUTH = 87,
        INTERNET_OPTION_SEND_UTF8_SERVERNAME_TO_PROXY = 88,
        INTERNET_OPTION_EXEMPT_CONNECTION_LIMIT = 89,
        INTERNET_OPTION_ENABLE_PASSPORT_AUTH = 90,
        INTERNET_OPTION_HIBERNATE_INACTIVE_WORKER_THREADS = 91,
        INTERNET_OPTION_ACTIVATE_WORKER_THREADS = 92,
        INTERNET_OPTION_RESTORE_WORKER_THREAD_DEFAULTS = 93,
        INTERNET_OPTION_SOCKET_SEND_BUFFER_LENGTH = 94,
        INTERNET_OPTION_PROXY_SETTINGS_CHANGED = 95,
        INTERNET_OPTION_DATAFILE_EXT = 96,
        INTERNET_OPTION_CODEPAGE_PATH = 100,
        INTERNET_OPTION_CODEPAGE_EXTRA = 101,
        INTERNET_OPTION_IDN = 102,
        INTERNET_OPTION_MAX_CONNS_PER_PROXY = 103,
        INTERNET_OPTION_SUPPRESS_SERVER_AUTH = 104,
        INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT = 105,
    }

    /// <summary>
    /// Callback Types.
    /// </summary>
    public enum JET_CBTYP : uint
    {
        JET_cbtypNull = 0x00000000,
        JET_cbtypFinalize = 0x00000001, /* a finalizable column has gone to zero */
        JET_cbtypBeforeInsert = 0x00000002, /* about to insert a record */
        JET_cbtypAfterInsert = 0x00000004, /* finished inserting a record */
        JET_cbtypBeforeReplace = 0x00000008, /* about to modify a record */
        JET_cbtypAfterReplace = 0x00000010, /* finished modifying a record */
        JET_cbtypBeforeDelete = 0x00000020, /* about to delete a record */
        JET_cbtypAfterDelete = 0x00000040, /* finished deleting the record */
        JET_cbtypUserDefinedDefaultValue = 0x00000080, /* calculating a user-defined default */
        JET_cbtypOnlineDefragCompleted = 0x00000100, /* a call to JetDefragment2 has completed */
        JET_cbtypFreeCursorLS = 0x00000200, /* the Local Storage associated with a cursor must be freed */
        JET_cbtypFreeTableLS = 0x00000400, /* the Local Storage associated with a table must be freed */
    }

    /// <summary>
    /// Column Type
    /// </summary>
    public enum JET_COLTYP : uint
    {
        JET_coltypNil = 0,
        JET_coltypBit = 1, /* True, False, or NULL */
        JET_coltypUnsignedByte = 2, /* 1-byte integer, unsigned */
        JET_coltypShort = 3, /* 2-byte integer, signed */
        JET_coltypLong = 4, /* 4-byte integer, signed */
        /// <summary>
        /// An 8-byte signed integer that can take on values between -9223372036854775808 and 9223372036854775807.
        /// Negative values sort before positive values. This column type is identical to the variant currency type.
        /// This column type can also be used as a native 8-byte signed integer.
        /// </summary>
        JET_coltypCurrency = 5,
        JET_coltypIEEESingle = 6, /* 4-byte IEEE single precision */
        JET_coltypIEEEDouble = 7, /* 8-byte IEEE double precision */
        JET_coltypDateTime = 8, /* Integral date, fractional time */
        JET_coltypBinary = 9, /* Binary data, < 255 bytes */
        JET_coltypText = 10, /* ANSI text, case insensitive, < 255 bytes */
        JET_coltypLongBinary = 11, /* Binary data, long value */
        JET_coltypLongText = 12, /* ANSI text, long value */
        JET_coltypSLV = 13, /* SLV's */
        /// <summary>
        /// 4-byte unsigned integer.
        /// This column type is supported on Windows Vista, Windows Server 2008 and later releases.
        /// </summary>
        JET_coltypUnsignedLong = 14,
        /// <summary>
        /// 8-byte signed integer.
        /// This column type is supported on Windows Vista, Windows Server 2008 and later releases.
        /// </summary>
        JET_coltypLongLong = 15,
        /// <summary>
        /// 16-byte globally unique identifier.
        /// This column type is supported on Windows Vista, Windows Server 2008 and later releases.
        /// </summary>
        JET_coltypGUID = 16,
        /// <summary>
        /// 2-byte unsigned integer.
        /// This column type is supported on Windows Vista, Windows Server 2008 and later releases.
        /// </summary>
        JET_coltypUnsignedShort = 17,
    }

    /// <summary>
    /// Column Identifier.
    /// </summary>
    public enum JET_COLUMNID : uint
    {
    }

    /// <summary>
    /// Database Identifier
    /// </summary>
    public enum JET_DBID : uint
    {
        JET_dbidNil = 0xFFFFFFFF,
    }

    /// <summary>
    /// Object Type
    /// </summary>
    public enum JET_OBJTYP : uint
    {
        JET_objtypNil = 0,
        JET_objtypTable = 1,
    }

    /// <summary>
    /// Group of Bits. The Flags attribute is omitted due to the frequent duplication of values.
    /// </summary>
    public enum JET_GRBIT : uint
    {
        [Obsolete]
        JET_bitDbUpgrade = 0x00000200,
        [Obsolete]
        JET_bitStrLimit = 0x00000002,
        [Obsolete]
        JET_bitSubStrLimit = 0x00000004,
        [Obsolete]
        JET_bitTableCreateNoFixedVarColumnsInDerivedTables = 0x00000004,
        JET_bitAbortSnapshot = 0x00000001,
        JET_bitAllDatabasesSnapshot = 0x00000001,
        JET_bitBackupAtomic = 0x00000004,
        JET_bitBackupEndAbort = 0x0002,
        JET_bitBackupEndNormal = 0x0001,
        JET_bitBackupIncremental = 0x00000001,
        JET_bitBackupSnapshot = 0x00000010,
        JET_bitBackupTruncateDone = 0x0100,
        JET_bitBookmarkPermitVirtualCurrency = 0x00000001, // place cursor on relative position in index if specified bookmark no longer exists,
        JET_bitCheckUniqueness = 0x00000040, // to be used with JET_bitSeekEQ only, returns JET_wrnUniqueKey if seek lands on a key which has no dupes,
        JET_bitColumnAutoincrement = 0x00000010,
        JET_bitColumnCompressed = 0x00080000, /* data in the column can be compressed */
        JET_bitColumnDeleteOnZero = 0x00020000, /* this is a finalizable column (delete record if escrow value equals 0) */
        JET_bitColumnEscrowUpdate = 0x00000800, /* escrow updated */
        JET_bitColumnFinalize = 0x00004000, /* this is a finalizable column (issue callback if escrow value equals 0) */
        JET_bitColumnFixed = 0x00000001,
        JET_bitColumnMaybeNull = 0x00002000, /* for retrieve column info of outer join where no match from the inner table */
        JET_bitColumnMultiValued = 0x00000400,
        JET_bitColumnNotNULL = 0x00000004,
        JET_bitColumnTagged = 0x00000002,
        JET_bitColumnTTDescending = 0x00000080, /* JetOpenTempTable only */
        JET_bitColumnTTKey = 0x00000040, /* JetOpenTempTable only */
        JET_bitColumnUnversioned = 0x00001000, /* for add column only - add column unversioned */
        JET_bitColumnUpdatable = 0x00000020, /* JetGetColumnInfo only */
        JET_bitColumnUserDefinedDefault = 0x00008000, /* default value from a user-provided callback */
        JET_bitColumnVersion = 0x00000008,
        JET_bitCommitLazyFlush = 0x00000001,
        JET_bitCompactRepair = 0x00000040, /* Don't preread and ignore duplicate keys */
        JET_bitCompactStats = 0x00000020, /* Dump off-line compaction stats (only when progress meter also specified) */
        JET_bitContinueAfterThaw = 0x00000004,
        JET_bitCopySnapshot = 0x00000002,
        JET_bitCreateHintAppendSequential = 0x00000002, // This bit will enable Append split behavior to grow according to the growth dynamics of the table (set by cbMinExtent, ulGrowth, cbMaxExtent).,
        JET_bitCreateHintHotpointSequential = 0x00000004, // This bit will enable Hotpoint split behavior to grow according to the growth dynamics of the table (set by cbMinExtent, ulGrowth, cbMaxExtent).,
        JET_bitDbDeleteCorruptIndexes = 0x00000010, /* delete indexes possibly corrupted by NT version upgrade */
        JET_bitDbDeleteUnicodeIndexes = 0x00000400, /* delete all indexes with unicode columns */
        JET_bitDbExclusive = 0x00000002, /* multiple opens allowed */
        JET_bitDbOverwriteExisting = 0x00000200, /* overwrite existing database with same name */
        JET_bitDbReadOnly = 0x00000001,
        JET_bitDbRecoveryOff = 0x00000008, /* disable logging/recovery for this database */
        JET_bitDbShadowingOff = 0x00000080, /* disable catalog shadowing */
        JET_bitDeleteColumnIgnoreTemplateColumns = 0x00000001, // for derived tables, don't bother looking in template columns,
        JET_bitDeleteHintTableSequential = 0x00000100, // This means that the application expects this table to be cleaned up in-order sequentially (from lowest key to highest key)
        JET_bitEightDotThreeSoftCompat = 0x00000002, // Preserve the 8.3 naming syntax for as long as possible. (this should not be changed, w/o ensuring there are no log files),
        JET_bitEnumerateCompressOutput = 0x00080000,
        JET_bitEnumerateCopy = JET_bitRetrieveCopy,
        JET_bitEnumerateIgnoreDefault = JET_bitRetrieveIgnoreDefault,
        JET_bitEnumerateIgnoreUserDefinedDefault = 0x00100000,
        JET_bitEnumerateInRecordOnly = 0x00200000,
        JET_bitEnumeratePresenceOnly = 0x00020000,
        JET_bitEnumerateTaggedOnly = 0x00040000,
        JET_bitEscrowNoRollback = 0x0001,
        JET_bitESE98FileNames = 0x00000001, // Preserve the .log and .chk extension for compatibility reasons (i.e. Exchange),
        JET_bitExplicitPrepare = 0x00000008,
        JET_bitForceCloseAndDetach = (0x00000002 | JET_bitForceDetach),
        JET_bitForceDetach = 0x00000001,
        JET_bitForceNewLog = 0x00000010,
        JET_bitFullColumnEndLimit = 0x00000200,
        JET_bitFullColumnStartLimit = 0x00000100,
        JET_bitIdleCompact = 0x00000002,
        JET_bitIdleFlushBuffers = 0x00000001,
        JET_bitIdleStatus = 0x00000004,
        JET_bitIncrementalSnapshot = 0x00000001,
        JET_bitIndexColumnMustBeNonNull = 0x00000002,
        JET_bitIndexColumnMustBeNull = 0x00000001,
        JET_bitIndexCrossProduct = 0x00004000, // index over multiple multi-valued columns has full cross product,
        JET_bitIndexDisallowNull = 0x00000004,
        JET_bitIndexDisallowTruncation = 0x00010000, // fail update rather than truncate index keys,
        JET_bitIndexEmpty = 0x00000100, // don't attempt to build index, because all entries would evaluate to NULL (MUST also specify JET_bitIgnoreAnyNull),
        JET_bitIndexIgnoreAnyNull = 0x00000020,
        JET_bitIndexIgnoreFirstNull = 0x00000040,
        JET_bitIndexIgnoreNull = 0x00000008,
        JET_bitIndexKeyMost = 0x00008000, // custom index key size set instead of default of 255 bytes,
        JET_bitIndexLazyFlush = 0x00000080,
        JET_bitIndexNestedTable = 0x00020000, // index over multiple multi-valued columns but only with values of same itagSequence,
        JET_bitIndexPrimary = 0x00000002,
        JET_bitIndexSortNullsHigh = 0x00000400, // NULL sorts after data for all columns in the index,
        JET_bitIndexTupleLimits = 0x00002000, // cbVarSegMac field of JET_INDEXCREATE actually points to a JET_TUPLELIMITS struct to allow custom tuple index limits (implies JET_bitIndexTuples),
        JET_bitIndexTuples = 0x00001000, // index on substring tuples (text columns only),
        JET_bitIndexUnicode = 0x00000800, // LCID field of JET_INDEXCREATE actually points to a JET_UNICODEINDEX struct to allow user-defined LCMapString() flags,
        JET_bitIndexUnique = 0x00000001,
        JET_bitIndexUnversioned = 0x00000200,
        JET_bitKeyAscending = 0x00000000,
        JET_bitKeyDataZeroLength = 0x00000010,
        JET_bitKeyDescending = 0x00000001,
        JET_bitLogStreamMustExist = 0x00000040, // transaction logs must exist in the logfile directory (ie. cannot auto-start a new log stream),
        JET_bitLSCursor = 0x00000002, /* set/retrieve LS of table cursor */
        JET_bitLSReset = 0x00000001, /* reset LS value */
        JET_bitLSTable = 0x00000004, /* set/retrieve LS of table */
        JET_bitMoveFirst = 0x00000000,
        JET_bitMoveKeyNE = 0x00000001,
        JET_bitNewKey = 0x00000001,
        JET_bitNil = 0,
        JET_bitNoMove = 0x00000002,
        JET_bitNormalizedKey = 0x00000008,
        JET_bitObjectSystem = 0x80000000, // Internal use only
        JET_bitObjectTableDerived = 0x10000000, // Table's DDL is inherited from a template table
        JET_bitObjectTableFixedDDL = 0x40000000, // Table's DDL is fixed
        JET_bitObjectTableNoFixedVarColumnsInDerivedTables = 0x04000000, // used in conjunction with JET_bitObjectTableTemplate
        JET_bitObjectTableTemplate = 0x20000000, // Table's DDL is inheritable (implies FixedDDL)
        JET_bitPartialColumnEndLimit = 0x00000800,
        JET_bitPartialColumnStartLimit = 0x00000400,
        JET_bitPrereadBackward = 0x00000002, /* Hint that the sequential traversal will be in the backward direction */
        JET_bitPrereadForward = 0x00000001, /* Hint that the sequential traversal will be in the forward direction */
        JET_bitRangeInclusive = 0x00000001,
        JET_bitRangeInstantDuration = 0x00000004,
        JET_bitRangeRemove = 0x00000008,
        JET_bitRangeUpperLimit = 0x00000002,
        JET_bitReadLock = 0x00000001,
        JET_bitRecordInIndex = 0x00000001,
        JET_bitRecordNotInIndex = 0x00000002,
        JET_bitRecoveryWithoutUndo = 0x00000008, // perform recovery, but halt at the Undo phase,
        JET_bitReplayIgnoreLostLogs = 0x00000080, // ignore logs lost from the end of the log stream,
        JET_bitReplayIgnoreMissingDB = 0x00000004, // ignore missing databases,
        JET_bitReplayMissingMapEntryDB = 0x00000020, /* missing database map entry default to same location */
        JET_bitRetrieveCopy = 0x00000001,
        JET_bitRetrieveFromIndex = 0x00000002,
        JET_bitRetrieveFromPrimaryBookmark = 0x00000004,
        JET_bitRetrieveHintReserve1 = 0x00000008, // Reserved and ignored,
        JET_bitRetrieveHintReserve2 = 0x00000040, // Reserved and ignored,
        JET_bitRetrieveHintReserve3 = 0x00000080, // Reserved and ignored,
        JET_bitRetrieveHintTableScanBackward = 0x00000020, // By setting this the client indicates that backwards sequential scan is the predominant usage pattern of this table.,
        JET_bitRetrieveHintTableScanForward = 0x00000010, // By setting this the client indicates that forward sequential scan is the predominant usage pattern of this table.,
        JET_bitRetrieveIgnoreDefault = 0x00000020,
        JET_bitRetrieveLongId = 0x00000040,
        JET_bitRetrieveLongValueRefCount = 0x00000080,
        JET_bitRetrieveNull = 0x00000010,
        JET_bitRetrieveTag = 0x00000008,
        JET_bitRetrieveTuple = 0x00000800,
        JET_bitRollbackAll = 0x00000001,
        JET_bitSeekEQ = 0x00000001,
        JET_bitSeekGE = 0x00000008,
        JET_bitSeekGT = 0x00000010,
        JET_bitSeekLE = 0x00000004,
        JET_bitSeekLT = 0x00000002,
        JET_bitSetAppendLV = 0x00000001,
        JET_bitSetCompressed = 0x00020000, /* attempt compression when storing the data */
        JET_bitSetIndexRange = 0x00000020,
        JET_bitSetIntrinsicLV = 0x00000400, /* store whole LV in record without bursting or return an error */
        JET_bitSetOverwriteLV = 0x00000004, /* overwrite JET_coltypLong* byte range */
        JET_bitSetRevertToDefaultValue = 0x00000200, /* if setting last tagged instance to NULL, revert to default value instead if one exists */
        JET_bitSetSeparateLV = 0x00000040, /* force LV separation */
        JET_bitSetSizeLV = 0x00000008, /* set JET_coltypLong* size */
        JET_bitSetUncompressed = 0x00010000, /* don't attempt compression when storing the data */
        JET_bitSetUniqueMultiValues = 0x00000080, /* prevent duplicate multi-values */
        JET_bitSetUniqueNormalizedMultiValues = 0x00000100, /* prevent duplicate multi-values, normalizing all data before performing comparisons */
        JET_bitSetZeroLength = 0x00000020,
        JET_bitSpaceHintsUtilizeParentSpace = 0x00000001, // This changes the internal allocation policy to get space heirarchically from a B-Tree's immediate parent.,
        JET_bitTableClass1 = 0x00010000, /*  table belongs to stats class 1  */
        JET_bitTableClass2 = 0x00020000, /*  table belongs to stats class 2  */
        JET_bitTableClass3 = 0x00030000, /*  table belongs to stats class 3  */
        JET_bitTableClass4 = 0x00040000, /*  table belongs to stats class 4  */
        JET_bitTableClass5 = 0x00050000, /*  table belongs to stats class 5  */
        JET_bitTableClass6 = 0x00060000, /*  table belongs to stats class 6  */
        JET_bitTableClass7 = 0x00070000, /*  table belongs to stats class 7  */
        JET_bitTableClass8 = 0x00080000, /*  table belongs to stats class 8  */
        JET_bitTableClass9 = 0x00090000, /*  table belongs to stats class 9  */
        JET_bitTableClass10 = 0x000A0000, /*  table belongs to stats class 10  */
        JET_bitTableClass11 = 0x000B0000, /*  table belongs to stats class 11  */
        JET_bitTableClass12 = 0x000C0000, /*  table belongs to stats class 12  */
        JET_bitTableClass13 = 0x000D0000, /*  table belongs to stats class 13  */
        JET_bitTableClass14 = 0x000E0000, /*  table belongs to stats class 14  */
        JET_bitTableClass15 = 0x000F0000, /*  table belongs to stats class 15  */
        JET_bitTableClassMask = 0x000F0000, /*  table stats class mask  */
        JET_bitTableClassNone = 0x00000000, /*  table belongs to no stats class (default)  */
        JET_bitTableCreateFixedDDL = 0x00000001, /* DDL is fixed */
        JET_bitTableCreateTemplateTable = 0x00000002, /* DDL is inheritable (implies FixedDDL) */
        JET_bitTableDenyRead = 0x00000002,
        JET_bitTableDenyWrite = 0x00000001,
        JET_bitTableInfoBookmark = 0x00000002,
        JET_bitTableInfoRollback = 0x00000004,
        JET_bitTableInfoUpdatable = 0x00000001,
        JET_bitTableNoCache = 0x00000020, /* don't cache the pages for this table */
        JET_bitTableOpportuneRead = 0x00000080, /* attempt to opportunely read physically adjacent leaf pages using larger physical IOs */
        JET_bitTablePermitDDL = 0x00000010, /*  override table flagged as FixedDDL (must be used with DenyRead) */
        JET_bitTablePreread = 0x00000040, /* assume the table is probably not in the buffer cache */
        JET_bitTableReadOnly = 0x00000004,
        JET_bitTableSequential = 0x00008000, /*  assume the table will be scanned sequentially */
        JET_bitTableUpdatable = 0x00000008,
        JET_bitTermAbrupt = 0x00000002,
        JET_bitTermComplete = 0x00000001,
        JET_bitTermDirty = 0x00000008,
        JET_bitTermStopBackup = 0x00000004,
        JET_bitTransactionReadOnly = 0x00000001,
        JET_bitTruncateLogsAfterRecovery = 0x00000010, // on successful soft recovery, truncate log files,
        JET_bitTTErrorOnDuplicateInsertion = JET_bitTTForceMaterialization, /* Error always returned when duplicate is inserted (instead of dupe being silently removed) */
        JET_bitTTForceMaterialization = 0x00000020, /* Forces temp. table to be materialized into a btree (allows for duplicate detection) */
        JET_bitTTForwardOnly = 0x00000040, /* Prevents temp. table from being materialized into a btree (and enables duplicate keys) */
        JET_bitTTIndexed = 0x00000001, /* Allow seek */
        JET_bitTTIntrinsicLVsOnly = 0x00000080, // permit only intrinsic LV's (so materialisation is not required simply because a TT has an LV column),
        JET_bitTTScrollable = 0x00000008, /* Allow backwards scrolling */
        JET_bitTTSortNullsHigh = 0x00000010, /* NULL sorts after data for all columns in the index */
        JET_bitTTUnique = 0x00000002, /* Remove duplicates */
        JET_bitTTUpdatable = 0x00000004, /* Allow updates */
        JET_bitUpdateCheckESE97Compatibility = 0x00000001,
        JET_bitWaitAllLevel0Commit = 0x00000008,
        JET_bitWaitLastLevel0Commit = 0x00000002,
        JET_bitWriteLock = 0x00000002,
    }

    /// <summary>
    /// Status Notification Process
    /// </summary>
    public enum JET_SNP : uint
    {
        JET_snpRepair = 2,
        JET_snpCompact = 4,
        JET_snpRestore = 8,
        JET_snpBackup = 9,
        JET_snpUpgrade = 10,
        JET_snpScrub = 11,
        JET_snpUpgradeRecordFormat = 12,
    }

    /// <summary>
    /// Status Notification Type
    /// </summary>
    public enum JET_SNT : uint
    {
        JET_sntBegin = 5, /* callback for beginning of operation */
        JET_sntRequirements = 7, /* callback for returning operation requirements */
        JET_sntProgress = 0, /* callback for progress */
        JET_sntComplete = 6, /* callback for completion of operation */
        JET_sntFail = 3, /* callback for failure during progress */
    }

    public enum JetColumnInfoLevel : uint
    {
        JET_ColInfo = 0,
        JET_ColInfoList = 1,
        JET_ColInfoSysTabCursor = 3,
        JET_ColInfoBase = 4,
        JET_ColInfoListCompact = 5,
        JET_ColInfoByColid = 6,
        [Obsolete]
        JET_ColInfoListSortColumnid = 7,
        JET_ColInfoBaseByColid = 8,
        JET_ColInfoGrbitNonDerivedColumnsOnly = 0x80000000,
        JET_ColInfoGrbitMinimalInfo = 0x40000000,
        JET_ColInfoGrbitSortByColumnid = 0x20000000,
    }

    public enum JetCursorInfoLevel : uint
    {
    }

    public enum JetDatabaseInfoLevel : uint
    {
        JET_DbInfoFilename = 0,
        JET_DbInfoConnect = 1,
        JET_DbInfoCountry = 2,
        JET_DbInfoLCID = 3,
        JET_DbInfoCp = 4,
        JET_DbInfoCollate = 5,
        JET_DbInfoOptions = 6,
        JET_DbInfoTransactions = 7,
        JET_DbInfoVersion = 8,
        JET_DbInfoIsam = 9,
        JET_DbInfoFilesize = 10,
        JET_DbInfoSpaceOwned = 11,
        JET_DbInfoSpaceAvailable = 12,
        JET_DbInfoUpgrade = 13,
        JET_DbInfoMisc = 14,
        JET_DbInfoDBInUse = 15,
        JET_DbInfoPageSize = 17,
        JET_DbInfoFileType = 19,
    }

    /// <summary>
    /// In the header file this is implemented as bitfields inside the JET_DBINFOUPGRADE struct.
    /// </summary>
    [Flags]
    public enum JetDbInfoUpgradeFlags : uint
    {
        Upgradeable = 1,
        AlreadyUpgraded = 2,
    }

    public enum JetDbState : uint
    {
        JET_dbstateJustCreated = 1,
        JET_dbstateDirtyShutdown = 2,
        JET_dbstateCleanShutdown = 3,
        JET_dbstateBeingConverted = 4,
        JET_dbstateForceDetach = 5,
    }

    public enum JetEventLoggingLevel : uint
    {
        JET_EventLoggingDisable = 0,
        JET_EventLoggingLevelLow = 25,
        JET_EventLoggingLevelMedium = 50,
        JET_EventLoggingLevelHigh = 75,
    }

    public enum JetExceptionAction : uint
    {
        JET_ExceptionMsgBox = 0x0001,
        JET_ExceptionNone = 0x0002,
    }

    public enum JetIndexInfoLevel : uint
    {
        JET_IdxInfo = 0,
        JET_IdxInfoList = 1,
        JET_IdxInfoSysTabCursor = 2,
        JET_IdxInfoOLC = 3,
        JET_IdxInfoResetOLC = 4,
        JET_IdxInfoSpaceAlloc = 5,
        JET_IdxInfoLCID = 6,
        JET_IdxInfoCount = 7,
        JET_IdxInfoVarSegMac = 8,
        JET_IdxInfoIndexId = 9,
        JET_IdxInfoKeyMost = 10,
        JET_IdxInfoCreateIndex = 11,
        JET_IdxInfoCreateIndex2 = 12,
    }

    public enum JetInstanceMiscInfoLevel : uint
    {
        JET_InstanceMiscInfoLogSignature = 0,
    }

    public enum JetObjectInfoLevel : uint
    {
        JET_ObjInfo = 0,
        JET_ObjInfoListNoStats = 1,
        JET_ObjInfoList = 2,
        JET_ObjInfoSysTabCursor = 3,
        JET_ObjInfoListACM = 4,
        JET_ObjInfoNoStats = 5,
        JET_ObjInfoSysTabReadOnly = 6,
        JET_ObjInfoRulesLoaded = 7,
        JET_ObjInfoMax = 8,
    }

    [Flags]
    public enum JetOnlineDefragFlags : uint
    {
        JET_OnlineDefragDisable = 0x0000, // disable online defrag
        [Obsolete]
        JET_OnlineDefragAllOBSOLETE = 0x0001, // enable online defrag for everything (must be 1 for backward compatibility)
        JET_OnlineDefragDatabases = 0x0002, // enable online defrag of databases
        JET_OnlineDefragSpaceTrees = 0x0004, // enable online defrag of space trees
        JET_OnlineDefragAll = 0xffff, // enable online defrag for everything
    }

    public enum JetPrepareUpdateCode : uint
    {
        JET_prepInsert = 0,
        JET_prepReplace = 2,
        JET_prepCancel = 3,
        JET_prepReplaceNoLock = 4,
        JET_prepInsertCopy = 5,
        JET_prepInsertCopyDeleteOriginal = 7,
    }

    public enum JetSystemParameterCode : uint
    {
        JET_paramAccessDeniedRetryPeriod = 0x00000035,
        JET_paramAlternateDatabaseRecoveryPath = 0x00000071,
        JET_paramBackupChunkSize = 0x00000042,
        JET_paramBackupOutstandingReads = 0x00000043,
        JET_paramBaseName = 0x00000003,
        [Obsolete]
        JET_paramBatchIOBufferMax = 0x00000016,
        JET_paramCachedClosedTables = 0x0000007D,
        JET_paramCacheSize = 0x00000029,
        JET_paramCacheSizeMax = 0x00000017,
        JET_paramCacheSizeMin = 0x0000003C,
        JET_paramCheckFormatWhenOpenFail = 0x0000002C,
        JET_paramCheckpointDepthMax = 0x00000018,
        JET_paramCheckpointIOMax = 0x00000087,
        JET_paramCircularLog = 0x00000011,
        JET_paramCleanupMismatchedLogFiles = 0x0000004D,
        JET_paramCommitDefault = 0x00000010,
        JET_paramConfiguration = 0x00000081,
        JET_paramCreatePathIfNotExist = 0x00000064,
        JET_paramDatabasePageSize = 0x00000040,
        JET_paramDbExtensionSize = 0x00000012,
        JET_paramDefragmentSequentialBTrees = 0x000000A0,
        JET_paramDefragmentSequentialBTreesDensityCheckFrequency = 0x000000A1,
        JET_paramDeleteOldLogs = 0x00000030,
        JET_paramDeleteOutOfRangeLogs = 0x00000034,
        JET_paramDisableCallbacks = 0x00000041,
        JET_paramDisablePerfmon = 0x0000006B,
        JET_paramEnableAdvanced = 0x00000082,
        JET_paramEnableFileCache = 0x0000007E,
        JET_paramEnableIndexChecking = 0x0000002D,
        JET_paramEnableIndexCleanup = 0x00000036,
        JET_paramEnableOnlineDefrag = 0x00000023,
        JET_paramEnablePersistedCallbacks = 0x0000009C,
        JET_paramEnableTempTableVersioning = 0x0000002E,
        JET_paramEnableViewCache = 0x0000007F,
        JET_paramErrorToString = 0x00000046,
        JET_paramEventLogCache = 0x00000063,
        JET_paramEventLoggingLevel = 0x00000033,
        JET_paramEventSource = 0x00000004,
        JET_paramEventSourceKey = 0x00000031,
        JET_paramExceptionAction = 0x00000062,
        JET_paramGlobalMinVerPages = 0x00000051,
        JET_paramIgnoreLogVersion = 0x0000002F,
        JET_paramIndexTupleIncrement = 0x00000084,
        JET_paramIndexTuplesLengthMax = 0x0000006F,
        JET_paramIndexTuplesLengthMin = 0x0000006E,
        JET_paramIndexTupleStart = 0x00000085,
        JET_paramIndexTuplesToIndexMax = 0x00000070,
        JET_paramIOPriority = 0x00000098,
        JET_paramIOThrottlingTimeQuanta = 0x000000A2,
        JET_paramKeyMost = 0x00000086,
        JET_paramLegacyFileNames = 0x00000088,
        JET_paramLogBuffers = 0x0000000C,
        JET_paramLogCheckpointPeriod = 0x0000000E,
        JET_paramLogFileCreateAsynch = 0x00000045,
        JET_paramLogFilePath = 0x00000002,
        JET_paramLogFileSize = 0x0000000B,
        JET_paramLogWaitingUserMax = 0x0000000F,
        JET_paramLRUKCorrInterval = 0x00000019,
        JET_paramLRUKHistoryMax = 0x0000001A,
        JET_paramLRUKPolicy = 0x0000001B,
        JET_paramLRUKTimeout = 0x0000001C,
        [Obsolete]
        JET_paramLRUKTrxCorrInterval = 0x0000001D,
        JET_paramLVChunkSizeMost = 0x000000A3,
        JET_paramMaxCoalesceReadGapSize = 0x000000A6,
        JET_paramMaxCoalesceReadSize = 0x000000A4,
        JET_paramMaxCoalesceWriteGapSize = 0x000000A7,
        JET_paramMaxCoalesceWriteSize = 0x000000A5,
        JET_paramMaxColtyp = 0x00000083,
        JET_paramMaxCursors = 0x00000008,
        JET_paramMaxInstances = 0x00000068,
        JET_paramMaxOpenTables = 0x00000006,
        JET_paramMaxSessions = 0x00000005,
        JET_paramMaxTemporaryTables = 0x0000000A,
        JET_paramMaxVerPages = 0x00000009,
        JET_paramNoInformationEvent = 0x00000032,
        JET_paramOneDatabasePerSession = 0x00000066,
        JET_paramOSSnapshotTimeout = 0x00000052,
        JET_paramOutstandingIOMax = 0x0000001E,
        JET_paramPageFragment = 0x00000014,
        JET_paramPageHintCacheSize = 0x00000065,
        JET_paramPageTempDBMin = 0x00000013,
        JET_paramPreferredMaxOpenTables = 0x00000007,
        JET_paramPreferredVerPages = 0x0000003F,
        JET_paramRecordUpgradeDirtyLevel = 0x0000004E,
        JET_paramRecovery = 0x00000022,
        JET_paramRuntimeCallback = 0x00000049,
        JET_paramSLVProviderEnable = 0x00000044,
        JET_paramStartFlushThreshold = 0x0000001F,
        JET_paramStopFlushThreshold = 0x00000020,
        JET_paramSystemPath = 0x00000000,
        JET_paramTableClass10Name = 0x00000092,
        JET_paramTableClass11Name = 0x00000093,
        JET_paramTableClass12Name = 0x00000094,
        JET_paramTableClass13Name = 0x00000095,
        JET_paramTableClass14Name = 0x00000096,
        JET_paramTableClass15Name = 0x00000097,
        JET_paramTableClass1Name = 0x00000089,
        JET_paramTableClass2Name = 0x0000008A,
        JET_paramTableClass3Name = 0x0000008B,
        JET_paramTableClass4Name = 0x0000008C,
        JET_paramTableClass5Name = 0x0000008D,
        JET_paramTableClass6Name = 0x0000008E,
        JET_paramTableClass7Name = 0x0000008F,
        JET_paramTableClass8Name = 0x00000090,
        JET_paramTableClass9Name = 0x00000091,
        JET_paramTempPath = 0x00000001,
        JET_paramUnicodeIndexDefault = 0x00000048,
        JET_paramVerPageSize = 0x00000080,
        JET_paramVersionStoreTaskQueueMax = 0x00000069,
        JET_paramWaitLogFlush = 0x0000000D,
        JET_paramWaypointLatency = 0x00000099,
        JET_paramZeroDatabaseDuringBackup = 0x00000047,
    }

    public enum JetTableInfoLevel : uint
    {
        JET_TblInfo = 0,
        JET_TblInfoName = 1,
        JET_TblInfoDbid = 2,
        JET_TblInfoMostMany = 3,
        JET_TblInfoRvt = 4,
        JET_TblInfoOLC = 5,
        JET_TblInfoResetOLC = 6,
        JET_TblInfoSpaceUsage = 7,
        JET_TblInfoDumpTable = 8,
        JET_TblInfoSpaceAlloc = 9,
        JET_TblInfoSpaceOwned = 10,
        JET_TblInfoSpaceAvailable = 11,
        JET_TblInfoTemplateTableName = 12,
    }

    [Flags]
    public enum KeyboardEventFlags : uint
    {
        /// <summary>If specified, the scan code was preceded by a prefix byte having the value 0xE0 (224).</summary>
        KEYEVENTF_EXTENDEDKEY = 0x0001,
        /// <summary>If specified, the key is being released. If not specified, the key is being depressed.</summary>
        KEYEVENTF_KEYUP = 0x0002,
        /// <summary>If specified, the system synthesizes a VK_PACKET keystroke. The wVk parameter must be zero. This flag can only be combined with the KEYEVENTF_KEYUP flag.</summary>
        KEYEVENTF_UNICODE = 0x0004,
        /// <summary>If specified, wScan identifies the key and wVk is ignored.</summary>
        KEYEVENTF_SCANCODE = 0x0008,
    }

    [Flags]
    public enum KeyboardLayoutFlags : uint
    {
        KLF_ACTIVATE = 0x00000001,
        KLF_SUBSTITUTE_OK = 0x00000002,
        KLF_REORDER = 0x00000008,
        KLF_REPLACELANG = 0x00000010,
        KLF_NOTELLSHELL = 0x00000080,
        KLF_SETFORPROCESS = 0x00000100,
        KLF_SHIFTLOCK = 0x00010000,
        KLF_RESET = 0x40000000,
    }

    [Flags]
    public enum KNOWN_FOLDER_FLAG : uint
    {
        KF_FLAG_CREATE = 0x00008000,
        KF_FLAG_DONT_VERIFY = 0x00004000,
        KF_FLAG_DONT_UNEXPAND = 0x00002000,
        KF_FLAG_NO_ALIAS = 0x00001000,
        KF_FLAG_INIT = 0x00000800,
        KF_FLAG_DEFAULT_PATH = 0x00000400,
        KF_FLAG_NOT_PARENT_RELATIVE = 0x00000200,
        KF_FLAG_SIMPLE_IDLIST = 0x00000100,
        KF_FLAG_ALIAS_ONLY = 0x80000000,
    }

    public enum LockSetForegroundWindowType : uint
    {
        LSFW_LOCK = 1,
        LSFW_UNLOCK = 2,
    }

    public enum LOGICAL_PROCESSOR_RELATIONSHIP : int
    {
        RelationProcessorCore = 0,
        RelationNumaNode = 1,
        RelationCache = 2,
        RelationProcessorPackage = 3,
        RelationGroup = 4,
        RelationAll = 0xffff,
    }

    [Flags]
    public enum MemoryFlags : uint
    {
        PAGE_NOACCESS = 0x01,
        PAGE_READONLY = 0x02,
        PAGE_READWRITE = 0x04,
        PAGE_WRITECOPY = 0x08,
        PAGE_EXECUTE = 0x10,
        PAGE_EXECUTE_READ = 0x20,
        PAGE_EXECUTE_READWRITE = 0x40,
        PAGE_EXECUTE_WRITECOPY = 0x80,
        PAGE_GUARD = 0x100,
        PAGE_NOCACHE = 0x200,
        PAGE_WRITECOMBINE = 0x400,
        MEM_COMMIT = 0x1000,
        MEM_RESERVE = 0x2000,
        MEM_DECOMMIT = 0x4000,
        MEM_RELEASE = 0x8000,
        MEM_FREE = 0x10000,
        MEM_PRIVATE = 0x20000,
        MEM_MAPPED = 0x40000,
        MEM_RESET = 0x80000,
        MEM_TOP_DOWN = 0x100000,
        MEM_WRITE_WATCH = 0x200000,
        MEM_PHYSICAL = 0x400000,
        MEM_ROTATE = 0x800000,
        MEM_LARGE_PAGES = 0x20000000,
        MEM_4MB_PAGES = 0x80000000,
        SEC_FILE = 0x800000,
        SEC_IMAGE = 0x1000000,
        SEC_PROTECTED_IMAGE = 0x2000000,
        SEC_RESERVE = 0x4000000,
        SEC_COMMIT = 0x8000000,
        SEC_NOCACHE = 0x10000000,
        SEC_WRITECOMBINE = 0x40000000,
        SEC_LARGE_PAGES = 0x80000000,
        MEM_IMAGE = SEC_IMAGE,
        WRITE_WATCH_FLAG_RESET = 0x01,
    }

    [Flags]
    public enum MessageBoxFlags : uint
    {
        MB_OK = 0x00000000,
        MB_OKCANCEL = 0x00000001,
        MB_ABORTRETRYIGNORE = 0x00000002,
        MB_YESNOCANCEL = 0x00000003,
        MB_YESNO = 0x00000004,
        MB_RETRYCANCEL = 0x00000005,
        MB_CANCELTRYCONTINUE = 0x00000006,
        MB_ICONHAND = 0x00000010,
        MB_ICONQUESTION = 0x00000020,
        MB_ICONEXCLAMATION = 0x00000030,
        MB_ICONASTERISK = 0x00000040,
        MB_USERICON = 0x00000080,
        MB_DEFBUTTON1 = 0x00000000,
        MB_DEFBUTTON2 = 0x00000100,
        MB_DEFBUTTON3 = 0x00000200,
        MB_DEFBUTTON4 = 0x00000300,
        MB_APPLMODAL = 0x00000000,
        MB_SYSTEMMODAL = 0x00001000,
        MB_TASKMODAL = 0x00002000,
        MB_HELP = 0x00004000,
        MB_NOFOCUS = 0x00008000,
        MB_SETFOREGROUND = 0x00010000,
        MB_DEFAULT_DESKTOP_ONLY = 0x00020000,
        MB_TOPMOST = 0x00040000,
        MB_RIGHT = 0x00080000,
        MB_RTLREADING = 0x00100000,
        MB_SERVICE_NOTIFICATION = 0x00200000,
        MB_TYPEMASK = 0x0000000F,
        MB_ICONMASK = 0x000000F0,
        MB_DEFMASK = 0x00000F00,
        MB_MODEMASK = 0x00003000,
        MB_MISCMASK = 0x0000C000,
    }

    public enum MMRESULT : uint
    {
        MMSYSERR_NOERROR = 0, /* no error */
        MMSYSERR_BASE = 0,
        MMSYSERR_ERROR = (MMSYSERR_BASE + 1), /* unspecified error */
        MMSYSERR_BADDEVICEID = (MMSYSERR_BASE + 2), /* device ID out of range */
        MMSYSERR_NOTENABLED = (MMSYSERR_BASE + 3), /* driver failed enable */
        MMSYSERR_ALLOCATED = (MMSYSERR_BASE + 4), /* device already allocated */
        MMSYSERR_INVALHANDLE = (MMSYSERR_BASE + 5), /* device handle is invalid */
        MMSYSERR_NODRIVER = (MMSYSERR_BASE + 6), /* no device driver present */
        MMSYSERR_NOMEM = (MMSYSERR_BASE + 7), /* memory allocation error */
        MMSYSERR_NOTSUPPORTED = (MMSYSERR_BASE + 8), /* function isn't supported */
        MMSYSERR_BADERRNUM = (MMSYSERR_BASE + 9), /* error value out of range */
        MMSYSERR_INVALFLAG = (MMSYSERR_BASE + 10), /* invalid flag passed */
        MMSYSERR_INVALPARAM = (MMSYSERR_BASE + 11), /* invalid parameter passed */
        MMSYSERR_HANDLEBUSY = (MMSYSERR_BASE + 12), /* handle being used simultaneously on another thread (eg callback),*/
        MMSYSERR_INVALIDALIAS = (MMSYSERR_BASE + 13), /* specified alias not found */
        MMSYSERR_BADDB = (MMSYSERR_BASE + 14), /* bad registry database */
        MMSYSERR_KEYNOTFOUND = (MMSYSERR_BASE + 15), /* registry key not found */
        MMSYSERR_READERROR = (MMSYSERR_BASE + 16), /* registry read error */
        MMSYSERR_WRITEERROR = (MMSYSERR_BASE + 17), /* registry write error */
        MMSYSERR_DELETEERROR = (MMSYSERR_BASE + 18), /* registry delete error */
        MMSYSERR_VALNOTFOUND = (MMSYSERR_BASE + 19), /* registry value not found */
        MMSYSERR_NODRIVERCB = (MMSYSERR_BASE + 20), /* driver does not call DriverCallback */
        MMSYSERR_MOREDATA = (MMSYSERR_BASE + 21), /* more data to be returned */
        MMSYSERR_LASTERROR = (MMSYSERR_BASE + 21), /* last error in range */
    }

    [Flags]
    public enum MONITORINFOF : uint
    {
        MONITORINFOF_PRIMARY = 1,
    }

    public enum MouseActivateCode : int
    {
        /// <summary>Activates the window, and does not discard the mouse message.</summary>
        MA_ACTIVATE = 1,
        /// <summary>Activates the window, and discards the mouse message.</summary>
        MA_ACTIVATEANDEAT = 2,
        /// <summary>Does not activate the window, and does not discard the mouse message.</summary>
        MA_NOACTIVATE = 3,
        /// <summary>Does not activate the window, but discards the mouse message.</summary>
        MA_NOACTIVATEANDEAT = 4,
    }

    [Flags]
    public enum MouseEventFlags : uint
    {
        MOUSEEVENTF_MOVE = 0x0001,
        MOUSEEVENTF_LEFTDOWN = 0x0002,
        MOUSEEVENTF_LEFTUP = 0x0004,
        MOUSEEVENTF_RIGHTDOWN = 0x0008,
        MOUSEEVENTF_RIGHTUP = 0x0010,
        MOUSEEVENTF_MIDDLEDOWN = 0x0020,
        MOUSEEVENTF_MIDDLEUP = 0x0040,
        MOUSEEVENTF_XDOWN = 0x0080,
        MOUSEEVENTF_XUP = 0x0100,
        MOUSEEVENTF_WHEEL = 0x0800,
        MOUSEEVENTF_HWHEEL = 0x01000,
        MOUSEEVENTF_MOVE_NOCOALESCE = 0x2000,
        MOUSEEVENTF_VIRTUALDESK = 0x4000,
        MOUSEEVENTF_ABSOLUTE = 0x8000,
    }

    /// <summary>
    /// These flags are specified in the WPARAM parameter of mouse window messages.
    /// </summary>
    [Flags]
    public enum MouseMessageFlags
    {
        /// <summary>The left mouse button is down.</summary>
        MK_LBUTTON = 0x0001,
        /// <summary>The right mouse button is down.</summary>
        MK_RBUTTON = 0x0002,
        /// <summary>The SHIFT key is down.</summary>
        MK_SHIFT = 0x0004,
        /// <summary>The CTRL key is down.</summary>
        MK_CONTROL = 0x0008,
        /// <summary>The middle mouse button is down.</summary>
        MK_MBUTTON = 0x0010,
        /// <summary>The first X button is down.</summary>
        MK_XBUTTON1 = 0x0020,
        /// <summary>The second X button is down.</summary>
        MK_XBUTTON2 = 0x0040,
    }

    [Flags]
    public enum MsgWaitForMultipleObjectsFlags : uint
    {
        /// <summary>This is not an official API constant and cannot be combined with other flags.</summary>
        MWMO_WAITANY = 0,
        MWMO_WAITALL = 0x0001,
        MWMO_ALERTABLE = 0x0002,
        MWMO_INPUTAVAILABLE = 0x0004,
    }

    [Flags]
    public enum NOTIFICATION_MASK : uint
    {
        TRANSACTION_NOTIFY_PREPREPARE = 0x00000001,
        TRANSACTION_NOTIFY_PREPARE = 0x00000002,
        TRANSACTION_NOTIFY_COMMIT = 0x00000004,
        TRANSACTION_NOTIFY_ROLLBACK = 0x00000008,
        TRANSACTION_NOTIFY_PREPREPARE_COMPLETE = 0x00000010,
        TRANSACTION_NOTIFY_PREPARE_COMPLETE = 0x00000020,
        TRANSACTION_NOTIFY_COMMIT_COMPLETE = 0x00000040,
        TRANSACTION_NOTIFY_ROLLBACK_COMPLETE = 0x00000080,
        TRANSACTION_NOTIFY_RECOVER = 0x00000100,
        TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT = 0x00000200,
        TRANSACTION_NOTIFY_DELEGATE_COMMIT = 0x00000400,
        TRANSACTION_NOTIFY_RECOVER_QUERY = 0x00000800,
        TRANSACTION_NOTIFY_ENLIST_PREPREPARE = 0x00001000,
        TRANSACTION_NOTIFY_LAST_RECOVER = 0x00002000,
        TRANSACTION_NOTIFY_INDOUBT = 0x00004000,
        TRANSACTION_NOTIFY_PROPAGATE_PULL = 0x00008000,
        TRANSACTION_NOTIFY_PROPAGATE_PUSH = 0x00010000,
        TRANSACTION_NOTIFY_MARSHAL = 0x00020000,
        TRANSACTION_NOTIFY_ENLIST_MASK = 0x00040000,
        TRANSACTION_NOTIFY_RM_DISCONNECTED = 0x01000000,
        TRANSACTION_NOTIFY_TM_ONLINE = 0x02000000,
        TRANSACTION_NOTIFY_COMMIT_REQUEST = 0x04000000,
        TRANSACTION_NOTIFY_PROMOTE = 0x08000000,
        TRANSACTION_NOTIFY_PROMOTE_NEW = 0x10000000,
        TRANSACTION_NOTIFY_REQUEST_OUTCOME = 0x20000000,
        /// <summary>
        /// Note that this flag is not included in the TRANSACTION_NOTIFY_MASK.
        /// The reason being that KTM does not understand this flag yet. This
        /// flag is strictly for the use of filter manager. In fact we mask it
        /// out before enlisting in any transaction.
        /// </summary>
        TRANSACTION_NOTIFY_COMMIT_FINALIZE = 0x40000000,
        TRANSACTION_NOTIFY_MASK = 0x3FFFFFFF,
    }

    public enum OBJECT_INFORMATION_CLASS : uint
    {
        ObjectBasicInformation = 0,
        ObjectNameInformation = 1,
        ObjectTypeInformation = 2,
    }

    [Flags]
    public enum ObjectAttributeFlags : uint
    {
        OBJ_INHERIT = 0x00000002,
        OBJ_PERMANENT = 0x00000010,
        OBJ_EXCLUSIVE = 0x00000020,
        OBJ_CASE_INSENSITIVE = 0x00000040,
        OBJ_OPENIF = 0x00000080,
        OBJ_OPENLINK = 0x00000100,
        OBJ_KERNEL_HANDLE = 0x00000200,
        OBJ_FORCE_ACCESS_CHECK = 0x00000400,
        OBJ_VALID_ATTRIBUTES = 0x000007F2,
    }

    public enum OSVersionConditionMask : byte
    {
        VER_EQUAL = 1,
        VER_GREATER = 2,
        VER_GREATER_EQUAL = 3,
        VER_LESS = 4,
        VER_LESS_EQUAL = 5,
        VER_AND = 6,
        VER_OR = 7,
    }

    [Flags]
    public enum OSVersionProductType : byte
    {
        VER_NT_WORKSTATION = 0x0000001,
        VER_NT_DOMAIN_CONTROLLER = 0x0000002,
        VER_NT_SERVER = 0x0000003,
    }

    [Flags]
    public enum OSVersionSuiteMask : ushort
    {
        VER_SUITE_SMALLBUSINESS = 0x00000001,
        VER_SUITE_ENTERPRISE = 0x00000002,
        VER_SUITE_BACKOFFICE = 0x00000004,
        VER_SUITE_COMMUNICATIONS = 0x00000008,
        VER_SUITE_TERMINAL = 0x00000010,
        VER_SUITE_SMALLBUSINESS_RESTRICTED = 0x00000020,
        VER_SUITE_EMBEDDEDNT = 0x00000040,
        VER_SUITE_DATACENTER = 0x00000080,
        VER_SUITE_SINGLEUSERTS = 0x00000100,
        VER_SUITE_PERSONAL = 0x00000200,
        VER_SUITE_BLADE = 0x00000400,
        VER_SUITE_EMBEDDED_RESTRICTED = 0x00000800,
        VER_SUITE_SECURITY_APPLIANCE = 0x00001000,
        VER_SUITE_STORAGE_SERVER = 0x00002000,
        VER_SUITE_COMPUTE_SERVER = 0x00004000,
        VER_SUITE_WH_SERVER = 0x00008000,
    }

    [Flags]
    public enum OSVersionTypeMask : uint
    {
        VER_MINORVERSION = 0x0000001,
        VER_MAJORVERSION = 0x0000002,
        VER_BUILDNUMBER = 0x0000004,
        VER_PLATFORMID = 0x0000008,
        VER_SERVICEPACKMINOR = 0x0000010,
        VER_SERVICEPACKMAJOR = 0x0000020,
        VER_SUITENAME = 0x0000040,
        VER_PRODUCT_TYPE = 0x0000080,
    }

    public enum PDH_STATUS : uint
    {
        /// <summary>This is not an official PDH_STATUS value but it masks the upper bits that establish success severity.</summary>
        SuccessMask = 0x00000000,
        /// <summary>This is not an official PDH_STATUS value but it masks the upper bits that establish informational severity.</summary>
        InformationalMask = 0x40000000,
        /// <summary>This is not an official PDH_STATUS value but it masks the upper bits that establish warning severity.</summary>
        WarningMask = 0x80000000,
        /// <summary>This is not an official PDH_STATUS value but it masks the upper bits that establish error severity.</summary>
        ErrorMask = 0xC0000000,
        /// <summary>This is not an official PDH_STATUS value but it masks the upper bits that establish any severity.</summary>
        SeverityMask = 0xC0000000,

        PDH_CSTATUS_VALID_DATA = 0x0,
        PDH_CSTATUS_NEW_DATA = 0x1,
        PDH_CSTATUS_NO_MACHINE = 0x800007D0,
        PDH_CSTATUS_NO_INSTANCE = 0x800007D1,
        PDH_MORE_DATA = 0x800007D2,
        PDH_CSTATUS_NO_OBJECT = 0xC0000BB8,
        PDH_CSTATUS_NO_COUNTER = 0xC0000BB9,
        PDH_CSTATUS_INVALID_DATA = 0xC0000BBA,
        PDH_CSTATUS_NO_COUNTERNAME = 0xC0000BBF,
        PDH_CSTATUS_BAD_COUNTERNAME = 0xC0000BC0,
        PDH_CSTATUS_ITEM_NOT_VALIDATED = 0x800007D3,
        PDH_RETRY = 0x800007D4,
        PDH_NO_DATA = 0x800007D5,
        PDH_CALC_NEGATIVE_DENOMINATOR = 0x800007D6,
        PDH_CALC_NEGATIVE_TIMEBASE = 0x800007D7,
        PDH_CALC_NEGATIVE_VALUE = 0x800007D8,
        PDH_DIALOG_CANCELLED = 0x800007D9,
        PDH_END_OF_LOG_FILE = 0x800007DA,
        PDH_ASYNC_QUERY_TIMEOUT = 0x800007DB,
        PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE = 0x800007DC,
        PDH_UNABLE_MAP_NAME_FILES = 0x80000BD5,
        PDH_PLA_VALIDATION_WARNING = 0x80000BF3,
        PDH_MEMORY_ALLOCATION_FAILURE = 0xC0000BBB,
        PDH_INVALID_HANDLE = 0xC0000BBC,
        PDH_INVALID_ARGUMENT = 0xC0000BBD,
        PDH_FUNCTION_NOT_FOUND = 0xC0000BBE,
        PDH_INVALID_BUFFER = 0xC0000BC1,
        PDH_INSUFFICIENT_BUFFER = 0xC0000BC2,
        PDH_CANNOT_CONNECT_MACHINE = 0xC0000BC3,
        PDH_INVALID_PATH = 0xC0000BC4,
        PDH_INVALID_INSTANCE = 0xC0000BC5,
        PDH_INVALID_DATA = 0xC0000BC6,
        PDH_NO_DIALOG_DATA = 0xC0000BC7,
        PDH_CANNOT_READ_NAME_STRINGS = 0xC0000BC8,
        PDH_LOG_FILE_CREATE_ERROR = 0xC0000BC9,
        PDH_LOG_FILE_OPEN_ERROR = 0xC0000BCA,
        PDH_LOG_TYPE_NOT_FOUND = 0xC0000BCB,
        PDH_NO_MORE_DATA = 0xC0000BCC,
        PDH_ENTRY_NOT_IN_LOG_FILE = 0xC0000BCD,
        PDH_DATA_SOURCE_IS_LOG_FILE = 0xC0000BCE,
        PDH_DATA_SOURCE_IS_REAL_TIME = 0xC0000BCF,
        PDH_UNABLE_READ_LOG_HEADER = 0xC0000BD0,
        PDH_FILE_NOT_FOUND = 0xC0000BD1,
        PDH_FILE_ALREADY_EXISTS = 0xC0000BD2,
        PDH_NOT_IMPLEMENTED = 0xC0000BD3,
        PDH_STRING_NOT_FOUND = 0xC0000BD4,
        PDH_UNKNOWN_LOG_FORMAT = 0xC0000BD6,
        PDH_UNKNOWN_LOGSVC_COMMAND = 0xC0000BD7,
        PDH_LOGSVC_QUERY_NOT_FOUND = 0xC0000BD8,
        PDH_LOGSVC_NOT_OPENED = 0xC0000BD9,
        PDH_WBEM_ERROR = 0xC0000BDA,
        PDH_ACCESS_DENIED = 0xC0000BDB,
        PDH_LOG_FILE_TOO_SMALL = 0xC0000BDC,
        PDH_INVALID_DATASOURCE = 0xC0000BDD,
        PDH_INVALID_SQLDB = 0xC0000BDE,
        PDH_NO_COUNTERS = 0xC0000BDF,
        PDH_SQL_ALLOC_FAILED = 0xC0000BE0,
        PDH_SQL_ALLOCCON_FAILED = 0xC0000BE1,
        PDH_SQL_EXEC_DIRECT_FAILED = 0xC0000BE2,
        PDH_SQL_FETCH_FAILED = 0xC0000BE3,
        PDH_SQL_ROWCOUNT_FAILED = 0xC0000BE4,
        PDH_SQL_MORE_RESULTS_FAILED = 0xC0000BE5,
        PDH_SQL_CONNECT_FAILED = 0xC0000BE6,
        PDH_SQL_BIND_FAILED = 0xC0000BE7,
        PDH_CANNOT_CONNECT_WMI_SERVER = 0xC0000BE8,
        PDH_PLA_COLLECTION_ALREADY_RUNNING = 0xC0000BE9,
        PDH_PLA_ERROR_SCHEDULE_OVERLAP = 0xC0000BEA,
        PDH_PLA_COLLECTION_NOT_FOUND = 0xC0000BEB,
        PDH_PLA_ERROR_SCHEDULE_ELAPSED = 0xC0000BEC,
        PDH_PLA_ERROR_NOSTART = 0xC0000BED,
        PDH_PLA_ERROR_ALREADY_EXISTS = 0xC0000BEE,
        PDH_PLA_ERROR_TYPE_MISMATCH = 0xC0000BEF,
        PDH_PLA_ERROR_FILEPATH = 0xC0000BF0,
        PDH_PLA_SERVICE_ERROR = 0xC0000BF1,
        PDH_PLA_VALIDATION_ERROR = 0xC0000BF2,
        PDH_PLA_ERROR_NAME_TOO_LONG = 0xC0000BF4,
        PDH_INVALID_SQL_LOG_FORMAT = 0xC0000BF5,
        PDH_COUNTER_ALREADY_IN_QUERY = 0xC0000BF6,
        PDH_BINARY_LOG_CORRUPT = 0xC0000BF7,
        PDH_LOG_SAMPLE_TOO_SMALL = 0xC0000BF8,
        PDH_OS_LATER_VERSION = 0xC0000BF9,
        PDH_OS_EARLIER_VERSION = 0xC0000BFA,
        PDH_INCORRECT_APPEND_TIME = 0xC0000BFB,
        PDH_UNMATCHED_APPEND_COUNTER = 0xC0000BFC,
        PDH_SQL_ALTER_DETAIL_FAILED = 0xC0000BFD,
        PDH_QUERY_PERF_DATA_TIMEOUT = 0xC0000BFE,
    }

    [Flags]
    public enum PdhExpandWildCardPathFlags : uint
    {
        PDH_NOEXPANDCOUNTERS = 1,
        PDH_NOEXPANDINSTANCES = 2,
        PDH_REFRESHCOUNTERS = 4,
    }

    [Flags]
    public enum PdhFormat : uint
    {
        PDH_FMT_RAW = 0x00000010,
        PDH_FMT_ANSI = 0x00000020,
        PDH_FMT_UNICODE = 0x00000040,
        PDH_FMT_LONG = 0x00000100,
        PDH_FMT_DOUBLE = 0x00000200,
        PDH_FMT_LARGE = 0x00000400,
        PDH_FMT_NOSCALE = 0x00001000,
        PDH_FMT_1000 = 0x00002000,
        PDH_FMT_NODATA = 0x00004000,
        PDH_FMT_NOCAP100 = 0x00008000,
        PERF_DETAIL_COSTLY = 0x00010000,
        PERF_DETAIL_STANDARD = 0x0000FFFF,
    }

    public enum PdhMakeCounterPathCode : uint
    {
        PDH_PATH_WBEM_RESULT = 0x00000001,
        PDH_PATH_WBEM_INPUT = 0x00000002,
    }

    [Flags]
    public enum PeekMessageRemoveFlags : uint
    {
        PM_NOREMOVE = 0x0000,
        PM_REMOVE = 0x0001,
        PM_NOYIELD = 0x0002,
        PM_QS_INPUT = (QueueStatusFlags.QS_INPUT << 16),
        PM_QS_PAINT = (QueueStatusFlags.QS_PAINT << 16),
        PM_QS_POSTMESSAGE = ((QueueStatusFlags.QS_POSTMESSAGE | QueueStatusFlags.QS_HOTKEY | QueueStatusFlags.QS_TIMER) << 16),
        PM_QS_SENDMESSAGE = (QueueStatusFlags.QS_SENDMESSAGE << 16),
    }

    public enum PerformanceCounterDetailLevel : uint
    {
        PERF_DETAIL_NOVICE = 100, // The uninformed can understand it
        PERF_DETAIL_ADVANCED = 200, // For the advanced user
        PERF_DETAIL_EXPERT = 300, // For the expert user
        PERF_DETAIL_WIZARD = 400, // For the system designer
    }

    [Flags]
    public enum PerformanceCounterType : uint
    {
        PERF_SIZE_DWORD = 0x00000000,  // 32 bit field
        PERF_SIZE_LARGE = 0x00000100,  // 64 bit field
        PERF_SIZE_ZERO = 0x00000200,  // for Zero Length fields
        PERF_SIZE_VARIABLE_LEN = 0x00000300,  // length is in CounterLength field of Counter Definition struct

        //  select one of the following values to indicate the counter field usage
        PERF_TYPE_NUMBER = 0x00000000,  // a number (not a counter)
        PERF_TYPE_COUNTER = 0x00000400,  // an increasing numeric value
        PERF_TYPE_TEXT = 0x00000800,  // a text field
        PERF_TYPE_ZERO = 0x00000C00,  // displays a zero

        //  If the PERF_TYPE_NUMBER field was selected, then select one of the
        //  following to describe the Number
        PERF_NUMBER_HEX = 0x00000000,  // display as HEX value
        PERF_NUMBER_DECIMAL = 0x00010000,  // display as a decimal integer
        PERF_NUMBER_DEC_1000 = 0x00020000,  // display as a decimal/1000

        //  If the PERF_TYPE_COUNTER value was selected then select one of the
        //  following to indicate the type of counter
        PERF_COUNTER_VALUE = 0x00000000,  // display counter value
        PERF_COUNTER_RATE = 0x00010000,  // divide ctr / delta time
        PERF_COUNTER_FRACTION = 0x00020000,  // divide ctr / base
        PERF_COUNTER_BASE = 0x00030000,  // base value used in fractions
        PERF_COUNTER_ELAPSED = 0x00040000,  // subtract counter from current time
        PERF_COUNTER_QUEUELEN = 0x00050000,  // Use Queuelen processing func.
        PERF_COUNTER_HISTOGRAM = 0x00060000,  // Counter begins or ends a histogram
        PERF_COUNTER_PRECISION = 0x00070000,  // divide ctr / private clock

        //  If the PERF_TYPE_TEXT value was selected, then select one of the
        //  following to indicate the type of TEXT data.
        PERF_TEXT_UNICODE = 0x00000000,  // type of text in text field
        PERF_TEXT_ASCII = 0x00010000,  // ASCII using the CodePage field

        //  Timer SubTypes
        PERF_TIMER_TICK = 0x00000000,  // use system perf. freq for base
        PERF_TIMER_100NS = 0x00100000,  // use 100 NS timer time base units
        PERF_OBJECT_TIMER = 0x00200000,  // use the object timer freq

        //  Any types that have calculations performed can use one or more of
        //  the following calculation modification flags listed here

        PERF_DELTA_COUNTER = 0x00400000,  // compute difference first
        PERF_DELTA_BASE = 0x00800000,  // compute base diff as well
        PERF_INVERSE_COUNTER = 0x01000000,  // show as 1.00-value (assumes:
        PERF_MULTI_COUNTER = 0x02000000,  // sum of multiple instances


        //  Select one of the following values to indicate the display suffix (if any)
        PERF_DISPLAY_NO_SUFFIX = 0x00000000,  // no suffix
        PERF_DISPLAY_PER_SEC = 0x10000000,  // "/sec"
        PERF_DISPLAY_PERCENT = 0x20000000,  // "%"
        PERF_DISPLAY_SECONDS = 0x30000000,  // "secs"
        PERF_DISPLAY_NOSHOW = 0x40000000,  // value is not displayed

        //  Predefined counter types

        // 32-bit Counter.  Divide delta by delta time.  Display suffix: "/sec"
        PERF_COUNTER_COUNTER =
            (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
            PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC),

        // 64-bit Timer.  Divide delta by delta time.  Display suffix: "%"
        PERF_COUNTER_TIMER =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
                    PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT),

        // Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
        PERF_COUNTER_QUEUELEN_TYPE =
                    (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN |
                    PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX),

        // Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
        PERF_COUNTER_LARGE_QUEUELEN_TYPE =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN |
                    PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX),

        // Queue Length Space-Time Product using 100 Ns timebase.
        // Divide delta by delta time. No Display Suffix.
        PERF_COUNTER_100NS_QUEUELEN_TYPE =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN |
                    PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX),

        // Queue Length Space-Time Product using Object specific timebase.
        // Divide delta by delta time. No Display Suffix.
        PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN |
                    PERF_OBJECT_TIMER | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX),

        // 64-bit Counter.  Divide delta by delta time. Display Suffix: "/sec"
        PERF_COUNTER_BULK_COUNT =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
                    PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC),

        // Indicates the counter is not a  counter but rather Unicode text Display as text.
        PERF_COUNTER_TEXT =
                    (PERF_SIZE_VARIABLE_LEN | PERF_TYPE_TEXT | PERF_TEXT_UNICODE |
                    PERF_DISPLAY_NO_SUFFIX),

        // Indicates the data is a counter  which should not be
        // time averaged on display (such as an error counter on a serial line)
        // Display as is.  No Display Suffix.
        PERF_COUNTER_RAWCOUNT =
                    (PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL |
                    PERF_DISPLAY_NO_SUFFIX),

        // Same as PERF_COUNTER_RAWCOUNT except its size is a large integer
        PERF_COUNTER_LARGE_RAWCOUNT =
                    (PERF_SIZE_LARGE | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL |
                    PERF_DISPLAY_NO_SUFFIX),

        // Special case for RAWCOUNT that want to be displayed in hex
        // Indicates the data is a counter  which should not be
        // time averaged on display (such as an error counter on a serial line)
        // Display as is.  No Display Suffix.
        PERF_COUNTER_RAWCOUNT_HEX =
                    (PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_HEX |
                    PERF_DISPLAY_NO_SUFFIX),

        // Same as PERF_COUNTER_RAWCOUNT_HEX except its size is a large integer
        PERF_COUNTER_LARGE_RAWCOUNT_HEX =
                    (PERF_SIZE_LARGE | PERF_TYPE_NUMBER | PERF_NUMBER_HEX |
                    PERF_DISPLAY_NO_SUFFIX),

        // A count which is either 1 or 0 on each sampling interrupt (% busy)
        // Divide delta by delta base. Display Suffix: "%"
        PERF_SAMPLE_FRACTION =
                    (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |
                    PERF_DELTA_COUNTER | PERF_DELTA_BASE | PERF_DISPLAY_PERCENT),

        // A count which is sampled on each sampling interrupt (queue length)
        // Divide delta by delta time. No Display Suffix.
        PERF_SAMPLE_COUNTER =
                    (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
                    PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX),

        // A label: no data is associated with this counter (it has 0 length)
        // Do not display.
        PERF_COUNTER_NODATA =
                    (PERF_SIZE_ZERO | PERF_DISPLAY_NOSHOW),

        // 64-bit Timer inverse (e.g., idle is measured, but display busy %)
        // Display 100 - delta divided by delta time.  Display suffix: "%"
        PERF_COUNTER_TIMER_INV =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
                    PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER |
                    PERF_DISPLAY_PERCENT),

        // The divisor for a sample, used with the previous counter to form a
        // sampled %.  You must check for >0 before dividing by this!  This
        // counter will directly follow the  numerator counter.  It should not
        // be displayed to the user.
        PERF_SAMPLE_BASE =
                    (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |
                    PERF_DISPLAY_NOSHOW |
                    0x00000001),  // for compatibility with pre-beta versions

        // A timer which, when divided by an average base, produces a time
        // in seconds which is the average time of some operation.  This
        // timer times total operations, and  the base is the number of opera-
        // tions.  Display Suffix: "sec"
        PERF_AVERAGE_TIMER =
                    (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |
                    PERF_DISPLAY_SECONDS),

        // Used as the denominator in the computation of time or count
        // averages.  Must directly follow the numerator counter.  Not dis-
        // played to the user.
        PERF_AVERAGE_BASE =
                    (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |
                    PERF_DISPLAY_NOSHOW |
                    0x00000002),  // for compatibility with pre-beta versions


        // A bulk count which, when divided (typically) by the number of
        // operations, gives (typically) the number of bytes per operation.
        // No Display Suffix.
        PERF_AVERAGE_BULK =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |
                    PERF_DISPLAY_NOSHOW),

        // 64-bit Timer in object specific units. Display delta divided by
        // delta time as returned in the object type header structure.  Display suffix: "%"
        PERF_OBJ_TIME_TIMER =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
                     PERF_OBJECT_TIMER | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT),

        // 64-bit Timer in 100 nsec units. Display delta divided by
        // delta time.  Display suffix: "%"
        PERF_100NSEC_TIMER =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
                    PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT),

        // 64-bit Timer inverse (e.g., idle is measured, but display busy %)
        // Display 100 - delta divided by delta time.  Display suffix: "%"
        PERF_100NSEC_TIMER_INV =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
                    PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER |
                    PERF_DISPLAY_PERCENT),

        // 64-bit Timer.  Divide delta by delta time.  Display suffix: "%"
        // Timer for multiple instances, so result can exceed 100%.
        PERF_COUNTER_MULTI_TIMER =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
                    PERF_DELTA_COUNTER | PERF_TIMER_TICK | PERF_MULTI_COUNTER |
                    PERF_DISPLAY_PERCENT),

        // 64-bit Timer inverse (e.g., idle is measured, but display busy %)
        // Display 100 * _MULTI_BASE - delta divided by delta time.
        // Display suffix: "%" Timer for multiple instances, so result
        // can exceed 100%.  Followed by a counter of type _MULTI_BASE.
        PERF_COUNTER_MULTI_TIMER_INV =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |
                    PERF_DELTA_COUNTER | PERF_MULTI_COUNTER | PERF_TIMER_TICK |
                    PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT),

        // Number of instances to which the preceding _MULTI_..._INV counter
        // applies.  Used as a factor to get the percentage.
        PERF_COUNTER_MULTI_BASE =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |
                    PERF_MULTI_COUNTER | PERF_DISPLAY_NOSHOW),

        // 64-bit Timer in 100 nsec units. Display delta divided by delta time.
        // Display suffix: "%" Timer for multiple instances, so result can exceed 100%.
        PERF_100NSEC_MULTI_TIMER =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER |
                    PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER |
                    PERF_DISPLAY_PERCENT),

        // 64-bit Timer inverse (e.g., idle is measured, but display busy %)
        // Display 100 * _MULTI_BASE - delta divided by delta time.
        // Display suffix: "%" Timer for multiple instances, so result
        // can exceed 100%.  Followed by a counter of type _MULTI_BASE.
        PERF_100NSEC_MULTI_TIMER_INV =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER |
                    PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER |
                    PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT),

        // Indicates the data is a fraction of the following counter  which
        // should not be time averaged on display (such as free space over
        // total space.) Display as is.  Display the quotient as "%".
        PERF_RAW_FRACTION =
                    (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |
                    PERF_DISPLAY_PERCENT),

        PERF_LARGE_RAW_FRACTION =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |
                    PERF_DISPLAY_PERCENT),

        // Indicates the data is a base for the preceding counter which should
        // not be time averaged on display (such as free space over total space.)
        PERF_RAW_BASE =
                    (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |
                    PERF_DISPLAY_NOSHOW |
                    0x00000003),  // for compatibility with pre-beta versions

        PERF_LARGE_RAW_BASE =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |
                    PERF_DISPLAY_NOSHOW),

        // The data collected in this counter is actually the start time of the
        // item being measured. For display, this data is subtracted from the
        // sample time to yield the elapsed time as the difference between the two.
        // In the definition below, the PerfTime field of the Object contains
        // the sample time as indicated by the PERF_OBJECT_TIMER bit and the
        // difference is scaled by the PerfFreq of the Object to convert the time
        // units into seconds.
        PERF_ELAPSED_TIME =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_ELAPSED |
                    PERF_OBJECT_TIMER | PERF_DISPLAY_SECONDS),

        //  The following counter type can be used with the preceding types to
        //  define a range of values to be displayed in a histogram.
        PERF_COUNTER_HISTOGRAM_TYPE = 0x80000000, // Counter begins or ends a histogram

        //  This counter is used to display the difference from one sample
        //  to the next. The counter value is a constantly increasing number
        //  and the value displayed is the difference between the current
        //  value and the previous value. Negative numbers are not allowed
        //  which shouldn't be a problem as long as the counter value is
        //  increasing or unchanged.
        PERF_COUNTER_DELTA =
                    (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_VALUE |
                    PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX),

        PERF_COUNTER_LARGE_DELTA =
                    (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_VALUE |
                    PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX),

        //  The precision counters are timers that consist of two counter values:
        //      1) the count of elapsed time of the event being monitored
        //      2) the "clock" time in the same units
        //
        //  the precition timers are used where the standard system timers are not
        //  precise enough for accurate readings. It's assumed that the service
        //  providing the data is also providing a timestamp at the same time which
        //  will eliminate any error that may occur since some small and variable
        //  time elapses between the time the system timestamp is captured and when
        //  the data is collected from the performance DLL. Only in extreme cases
        //  has this been observed to be problematic.
        //
        //  when using this type of timer, the definition of the
        //      PERF_PRECISION_TIMESTAMP counter must immediately follow the
        //      definition of the PERF_PRECISION_*_TIMER in the Object header
        //
        // The timer used has the same frequency as the System Performance Timer
        PERF_PRECISION_SYSTEM_TIMER =
                (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_PRECISION |
                 PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT),

        // The timer used has the same frequency as the 100 NanoSecond Timer
        PERF_PRECISION_100NS_TIMER =
                (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_PRECISION |
                 PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT),

        // The timer used is of the frequency specified in the Object header's
        //  PerfFreq field (PerfTime is ignored)
        PERF_PRECISION_OBJECT_TIMER =
                (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_PRECISION |
                 PERF_OBJECT_TIMER | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT),

        // This is the timestamp to use in the computation of the timer specified
        // in the previous description block
        PERF_PRECISION_TIMESTAMP = PERF_LARGE_RAW_BASE,
    }

    public enum PrimaryLanguageId : byte
    {
        LANG_NEUTRAL = 0x00,
        LANG_INVARIANT = 0x7f,
        LANG_AFRIKAANS = 0x36,
        LANG_ALBANIAN = 0x1c,
        LANG_ALSATIAN = 0x84,
        LANG_AMHARIC = 0x5e,
        LANG_ARABIC = 0x01,
        LANG_ARMENIAN = 0x2b,
        LANG_ASSAMESE = 0x4d,
        LANG_AZERI = 0x2c,
        LANG_BASHKIR = 0x6d,
        LANG_BASQUE = 0x2d,
        LANG_BELARUSIAN = 0x23,
        LANG_BENGALI = 0x45,
        LANG_BRETON = 0x7e,
        LANG_BOSNIAN = 0x1a,
        //LANG_BOSNIAN_NEUTRAL = 0x781a,
        LANG_BULGARIAN = 0x02,
        LANG_CATALAN = 0x03,
        LANG_CHINESE = 0x04,
        LANG_CHINESE_SIMPLIFIED = 0x04,
        //LANG_CHINESE_TRADITIONAL = 0x7c04,
        LANG_CORSICAN = 0x83,
        LANG_CROATIAN = 0x1a,
        LANG_CZECH = 0x05,
        LANG_DANISH = 0x06,
        LANG_DARI = 0x8c,
        LANG_DIVEHI = 0x65,
        LANG_DUTCH = 0x13,
        LANG_ENGLISH = 0x09,
        LANG_ESTONIAN = 0x25,
        LANG_FAEROESE = 0x38,
        LANG_FARSI = 0x29,
        LANG_FILIPINO = 0x64,
        LANG_FINNISH = 0x0b,
        LANG_FRENCH = 0x0c,
        LANG_FRISIAN = 0x62,
        LANG_GALICIAN = 0x56,
        LANG_GEORGIAN = 0x37,
        LANG_GERMAN = 0x07,
        LANG_GREEK = 0x08,
        LANG_GREENLANDIC = 0x6f,
        LANG_GUJARATI = 0x47,
        LANG_HAUSA = 0x68,
        LANG_HEBREW = 0x0d,
        LANG_HINDI = 0x39,
        LANG_HUNGARIAN = 0x0e,
        LANG_ICELANDIC = 0x0f,
        LANG_IGBO = 0x70,
        LANG_INDONESIAN = 0x21,
        LANG_INUKTITUT = 0x5d,
        LANG_IRISH = 0x3c,
        LANG_ITALIAN = 0x10,
        LANG_JAPANESE = 0x11,
        LANG_KANNADA = 0x4b,
        LANG_KASHMIRI = 0x60,
        LANG_KAZAK = 0x3f,
        LANG_KHMER = 0x53,
        LANG_KICHE = 0x86,
        LANG_KINYARWANDA = 0x87,
        LANG_KONKANI = 0x57,
        LANG_KOREAN = 0x12,
        LANG_KYRGYZ = 0x40,
        LANG_LAO = 0x54,
        LANG_LATVIAN = 0x26,
        LANG_LITHUANIAN = 0x27,
        LANG_LOWER_SORBIAN = 0x2e,
        LANG_LUXEMBOURGISH = 0x6e,
        LANG_MACEDONIAN = 0x2f,
        LANG_MALAY = 0x3e,
        LANG_MALAYALAM = 0x4c,
        LANG_MALTESE = 0x3a,
        LANG_MANIPURI = 0x58,
        LANG_MAORI = 0x81,
        LANG_MAPUDUNGUN = 0x7a,
        LANG_MARATHI = 0x4e,
        LANG_MOHAWK = 0x7c,
        LANG_MONGOLIAN = 0x50,
        LANG_NEPALI = 0x61,
        LANG_NORWEGIAN = 0x14,
        LANG_OCCITAN = 0x82,
        LANG_ORIYA = 0x48,
        LANG_PASHTO = 0x63,
        LANG_PERSIAN = 0x29,
        LANG_POLISH = 0x15,
        LANG_PORTUGUESE = 0x16,
        LANG_PUNJABI = 0x46,
        LANG_QUECHUA = 0x6b,
        LANG_ROMANIAN = 0x18,
        LANG_ROMANSH = 0x17,
        LANG_RUSSIAN = 0x19,
        LANG_SAMI = 0x3b,
        LANG_SANSKRIT = 0x4f,
        LANG_SCOTTISH_GAELIC = 0x91,
        LANG_SERBIAN = 0x1a,
        //LANG_SERBIAN_NEUTRAL = 0x7c1a,
        LANG_SINDHI = 0x59,
        LANG_SINHALESE = 0x5b,
        LANG_SLOVAK = 0x1b,
        LANG_SLOVENIAN = 0x24,
        LANG_SOTHO = 0x6c,
        LANG_SPANISH = 0x0a,
        LANG_SWAHILI = 0x41,
        LANG_SWEDISH = 0x1d,
        LANG_SYRIAC = 0x5a,
        LANG_TAJIK = 0x28,
        LANG_TAMAZIGHT = 0x5f,
        LANG_TAMIL = 0x49,
        LANG_TATAR = 0x44,
        LANG_TELUGU = 0x4a,
        LANG_THAI = 0x1e,
        LANG_TIBETAN = 0x51,
        LANG_TIGRIGNA = 0x73,
        LANG_TSWANA = 0x32,
        LANG_TURKISH = 0x1f,
        LANG_TURKMEN = 0x42,
        LANG_UIGHUR = 0x80,
        LANG_UKRAINIAN = 0x22,
        LANG_UPPER_SORBIAN = 0x2e,
        LANG_URDU = 0x20,
        LANG_UZBEK = 0x43,
        LANG_VIETNAMESE = 0x2a,
        LANG_WELSH = 0x52,
        LANG_WOLOF = 0x88,
        LANG_XHOSA = 0x34,
        LANG_YAKUT = 0x85,
        LANG_YI = 0x78,
        LANG_YORUBA = 0x6a,
        LANG_ZULU = 0x35,
    }

    [Flags]
    public enum PRIVATE_NAMESPACE_FLAG : uint
    {
        PRIVATE_NAMESPACE_FLAG_DESTROY = 0x00000001,
    }

    public enum PROC_THREAD_ATTRIBUTE_NUM : uint
    {
        ProcThreadAttributeParentProcess = 0,
        ProcThreadAttributeExtendedFlags = 1,
        ProcThreadAttributeHandleList = 2,
        ProcThreadAttributeGroupAffinity = 3,
        ProcThreadAttributePreferredNode = 4,
        ProcThreadAttributeIdealProcessor = 5,
        ProcThreadAttributeUmsThread = 6,
        ProcThreadAttributeMitigationPolicy = 7,
        ProcThreadAttributeMax = 8,
    }

    [Flags]
    public enum ProcessAccessRights : uint
    {
        /// <summary>Enables usage of the process handle in the TerminateProcess function to terminate the process.</summary>
        PROCESS_TERMINATE = 0x0001,
        /// <summary>Enables usage of the process handle in the CreateRemoteThread function to create a thread in the process.</summary>
        PROCESS_CREATE_THREAD = 0x0002,
        PROCESS_SET_SESSIONID = 0x0004,
        /// <summary>Enables usage of the process handle in the VirtualProtectEx and WriteProcessMemory functions to modify the virtual memory of the process.</summary>
        PROCESS_VM_OPERATION = 0x0008,
        /// <summary>Enables usage of the process handle in the ReadProcessMemory function to read from the virtual memory of the process.</summary>
        PROCESS_VM_READ = 0x0010,
        /// <summary>Enables usage of the process handle in the WriteProcessMemory function to write to the virtual memory of the process.</summary>
        PROCESS_VM_WRITE = 0x0020,
        /// <summary>Enables usage of the process handle as either the source or target process in the DuplicateHandle function to duplicate a handle.</summary>
        PROCESS_DUP_HANDLE = 0x0040,
        PROCESS_CREATE_PROCESS = 0x0080,
        PROCESS_SET_QUOTA = 0x0100,
        /// <summary>Enables usage of the process handle in the SetPriorityClass function to set the priority class of the process.</summary>
        PROCESS_SET_INFORMATION = 0x0200,
        /// <summary>Enables usage of the process handle in the GetExitCodeProcess and GetPriorityClass functions to read information from the process object.</summary>
        PROCESS_QUERY_INFORMATION = 0x0400,
        PROCESS_SUSPEND_RESUME = 0x0800,
        PROCESS_QUERY_LIMITED_INFORMATION = 0x1000,
        PROCESS_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    [Flags]
    public enum ProcessHeapFlags : ushort
    {
        PROCESS_HEAP_REGION = 0x0001,
        PROCESS_HEAP_UNCOMMITTED_RANGE = 0x0002,
        PROCESS_HEAP_ENTRY_BUSY = 0x0004,
        PROCESS_HEAP_ENTRY_MOVEABLE = 0x0010,
        PROCESS_HEAP_ENTRY_DDESHARE = 0x0020,
    }

    public enum PROCESSINFOCLASS : int
    {
        ProcessBasicInformation = 0,
        ProcessQuotaLimits = 1,
        ProcessIoCounters = 2,
        ProcessVmCounters = 3,
        ProcessTimes = 4,
        ProcessBasePriority = 5,
        ProcessRaisePriority = 6,
        ProcessDebugPort = 7,
        ProcessExceptionPort,
        ProcessAccessToken,
        ProcessLdtInformation,
        ProcessLdtSize,
        ProcessDefaultHardErrorMode,
        ProcessIoPortHandlers,
        ProcessPooledUsageAndLimits,
        ProcessWorkingSetWatch,
        ProcessUserModeIOPL,
        ProcessEnableAlignmentFaultFixup,
        ProcessPriorityClass,
        ProcessWx86Information,
        ProcessHandleCount,
        ProcessAffinityMask,
        ProcessPriorityBoost,
        ProcessDeviceMap,
        ProcessSessionInformation,
        ProcessForegroundInformation,
        ProcessWow64Information,
        ProcessImageFileName,
        ProcessLUIDDeviceMapsEnabled,
        ProcessBreakOnTermination,
        ProcessDebugObjectHandle,
        ProcessDebugFlags,
        ProcessHandleTracing,
        ProcessIoPriority,
        ProcessExecuteFlags,
        ProcessTlsInformation,
        ProcessCookie,
        ProcessImageInformation,
        ProcessCycleTime,
        ProcessPagePriority,
        ProcessInstrumentationCallback,
        ProcessThreadStackAllocation,
        ProcessWorkingSetWatchEx,
        ProcessImageFileNameWin32,
        ProcessImageFileMapping,
        ProcessAffinityUpdateMode,
        ProcessMemoryAllocationMode,
        ProcessGroupInformation,
        ProcessTokenVirtualizationEnabled,
        ProcessConsoleHostProcess,
        ProcessWindowInformation,
        MaxProcessInfoClass,
    }

    public enum ProcessorArchitecture : ushort
    {
        PROCESSOR_ARCHITECTURE_INTEL = 0,
        PROCESSOR_ARCHITECTURE_MIPS = 1,
        PROCESSOR_ARCHITECTURE_ALPHA = 2,
        PROCESSOR_ARCHITECTURE_PPC = 3,
        PROCESSOR_ARCHITECTURE_SHX = 4,
        PROCESSOR_ARCHITECTURE_ARM = 5,
        PROCESSOR_ARCHITECTURE_IA64 = 6,
        PROCESSOR_ARCHITECTURE_ALPHA64 = 7,
        PROCESSOR_ARCHITECTURE_MSIL = 8,
        PROCESSOR_ARCHITECTURE_AMD64 = 9,
        PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 = 10,
        PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF,
    }

    public enum ProcessorFeature : uint
    {
        PF_FLOATING_POINT_PRECISION_ERRATA = 0,
        PF_FLOATING_POINT_EMULATED = 1,
        PF_COMPARE_EXCHANGE_DOUBLE = 2,
        PF_MMX_INSTRUCTIONS_AVAILABLE = 3,
        PF_PPC_MOVEMEM_64BIT_OK = 4,
        PF_ALPHA_BYTE_INSTRUCTIONS = 5,
        PF_XMMI_INSTRUCTIONS_AVAILABLE = 6,
        PF_3DNOW_INSTRUCTIONS_AVAILABLE = 7,
        PF_RDTSC_INSTRUCTION_AVAILABLE = 8,
        PF_PAE_ENABLED = 9,
        PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10,
        PF_SSE_DAZ_MODE_AVAILABLE = 11,
        PF_NX_ENABLED = 12,
        PF_SSE3_INSTRUCTIONS_AVAILABLE = 13,
        PF_COMPARE_EXCHANGE128 = 14,
        PF_COMPARE64_EXCHANGE128 = 15,
        PF_CHANNELS_ENABLED = 16,
        PF_XSAVE_ENABLED = 17,
    }

    [Flags]
    public enum ProcessThreadAttributes : uint
    {
        /// <summary>This masks <see cref="PROC_THREAD_ATTRIBUTE_NUM"/>.</summary>
        PROC_THREAD_ATTRIBUTE_NUMBER = 0x0000FFFF,
        PROC_THREAD_ATTRIBUTE_THREAD = 0x00010000,  // Attribute may be used with thread creation
        PROC_THREAD_ATTRIBUTE_INPUT = 0x00020000,  // Attribute is input only
        PROC_THREAD_ATTRIBUTE_ADDITIVE = 0x00040000,  // Attribute may be "accumulated," e.g. bitmasks, counters, etc.

        PROC_THREAD_ATTRIBUTE_REPLACE_VALUE = 0x00000001,

        PROC_THREAD_ATTRIBUTE_PARENT_PROCESS = PROC_THREAD_ATTRIBUTE_NUM.ProcThreadAttributeParentProcess | PROC_THREAD_ATTRIBUTE_INPUT,
        PROC_THREAD_ATTRIBUTE_EXTENDED_FLAGS = PROC_THREAD_ATTRIBUTE_NUM.ProcThreadAttributeExtendedFlags | PROC_THREAD_ATTRIBUTE_INPUT | PROC_THREAD_ATTRIBUTE_ADDITIVE,
        PROC_THREAD_ATTRIBUTE_HANDLE_LIST = PROC_THREAD_ATTRIBUTE_NUM.ProcThreadAttributeHandleList | PROC_THREAD_ATTRIBUTE_INPUT,
        PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY = PROC_THREAD_ATTRIBUTE_NUM.ProcThreadAttributeGroupAffinity | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT,
        PROC_THREAD_ATTRIBUTE_PREFERRED_NODE = PROC_THREAD_ATTRIBUTE_NUM.ProcThreadAttributePreferredNode | PROC_THREAD_ATTRIBUTE_INPUT,
        PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR = PROC_THREAD_ATTRIBUTE_NUM.ProcThreadAttributeIdealProcessor | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT,
        PROC_THREAD_ATTRIBUTE_UMS_THREAD = PROC_THREAD_ATTRIBUTE_NUM.ProcThreadAttributeUmsThread | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT,
        PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = PROC_THREAD_ATTRIBUTE_NUM.ProcThreadAttributeMitigationPolicy | PROC_THREAD_ATTRIBUTE_INPUT,
    }

    [Flags]
    public enum QueryFullProcessImageNameFlags : uint
    {
        PROCESS_NAME_NATIVE = 0x00000001,
    }

    [Flags]
    public enum QueueStatusFlags : uint
    {
        QS_KEY = 0x0001,
        QS_MOUSEMOVE = 0x0002,
        QS_MOUSEBUTTON = 0x0004,
        QS_POSTMESSAGE = 0x0008,
        QS_TIMER = 0x0010,
        QS_PAINT = 0x0020,
        QS_SENDMESSAGE = 0x0040,
        QS_HOTKEY = 0x0080,
        QS_ALLPOSTMESSAGE = 0x0100,
        QS_RAWINPUT = 0x0400,
        QS_MOUSE = QS_MOUSEMOVE | QS_MOUSEBUTTON,
        QS_INPUT = QS_MOUSE | QS_KEY | QS_RAWINPUT,
        QS_ALLEVENTS = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY,
        QS_ALLINPUT = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE,
    }

    [Flags]
    public enum RawInputDeviceFlags : uint
    {
        RIDEV_REMOVE = 0x00000001,
        RIDEV_EXCLUDE = 0x00000010,
        RIDEV_PAGEONLY = 0x00000020,
        RIDEV_NOLEGACY = 0x00000030,
        RIDEV_INPUTSINK = 0x00000100,
        RIDEV_CAPTUREMOUSE = 0x00000200, // effective when mouse nolegacy is specified, otherwise it would be an error
        RIDEV_NOHOTKEYS = 0x00000200,// effective for keyboard.
        RIDEV_APPKEYS = 0x00000400,// effective for keyboard.
        RIDEV_EXINPUTSINK = 0x00001000,
        RIDEV_DEVNOTIFY = 0x00002000,
        RIDEV_EXMODEMASK = 0x000000F0,
    }

    [Flags]
    public enum RegGetValueFlags : uint
    {
        RRF_RT_REG_NONE = 0x00000001, // restrict type to REG_NONE      (other data types will not return ERROR_SUCCESS)
        RRF_RT_REG_SZ = 0x00000002, // restrict type to REG_SZ        (other data types will not return ERROR_SUCCESS) (automatically converts REG_EXPAND_SZ to REG_SZ unless RRF_NOEXPAND is specified)
        RRF_RT_REG_EXPAND_SZ = 0x00000004, // restrict type to REG_EXPAND_SZ (other data types will not return ERROR_SUCCESS) (must specify RRF_NOEXPAND or RegGetValue will fail with ERROR_INVALID_PARAMETER)
        RRF_RT_REG_BINARY = 0x00000008, // restrict type to REG_BINARY    (other data types will not return ERROR_SUCCESS)
        RRF_RT_REG_DWORD = 0x00000010, // restrict type to REG_DWORD     (other data types will not return ERROR_SUCCESS)
        RRF_RT_REG_MULTI_SZ = 0x00000020, // restrict type to REG_MULTI_SZ  (other data types will not return ERROR_SUCCESS)
        RRF_RT_REG_QWORD = 0x00000040, // restrict type to REG_QWORD     (other data types will not return ERROR_SUCCESS)

        RRF_RT_DWORD = (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD), // restrict type to *32-bit* RRF_RT_REG_BINARY or RRF_RT_REG_DWORD (other data types will not return ERROR_SUCCESS)
        RRF_RT_QWORD = (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD), // restrict type to *64-bit* RRF_RT_REG_BINARY or RRF_RT_REG_DWORD (other data types will not return ERROR_SUCCESS)
        RRF_RT_ANY = 0x0000ffff, // no type restriction

        RRF_NOEXPAND = 0x10000000, // do not automatically expand environment strings if value is of type REG_EXPAND_SZ
        RRF_ZEROONFAILURE = 0x20000000, // if pvData is not NULL, set content to all zeros on failure
    }

    public enum REGHANDLE : ulong
    {
        NULL = 0,
    }

    public enum RegisterShellHookWindowCode : uint
    {
        RSH_UNREGISTER = 0,
        RSH_REGISTER = 1,
        RSH_PROGMAN = 2,
        RSH_TASKMAN = 3,
    }

    public enum RegistryCreationDisposition : uint
    {
        REG_CREATED_NEW_KEY = 0x00000001,
        REG_OPENED_EXISTING_KEY = 0x00000002,
    }

    [Flags]
    public enum RegistryNotifyChangeFlags : uint
    {
        REG_NOTIFY_CHANGE_NAME = 0x00000001, // Create or delete (child)
        REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
        REG_NOTIFY_CHANGE_LAST_SET = 0x00000004, // time stamp
        REG_NOTIFY_CHANGE_SECURITY = 0x00000008,
    }

    public enum RegistryOption : uint
    {
        REG_OPTION_NON_VOLATILE = 0x00000000,
        REG_OPTION_VOLATILE = 0x00000001,
        REG_OPTION_CREATE_LINK = 0x00000002,
        REG_OPTION_BACKUP_RESTORE = 0x00000004,
        REG_OPTION_OPEN_LINK = 0x00000008,
    }

    public enum RegistryValueType : uint
    {
        REG_NONE = 0, // No value type
        REG_SZ = 1, // Unicode nul terminated string
        REG_EXPAND_SZ = 2, // Unicode nul terminated string =with environment variable references
        REG_BINARY = 3, // Free form binary
        REG_DWORD = 4, // 32-bit number
        REG_DWORD_LITTLE_ENDIAN = 4, // 32-bit number =same as REG_DWORD
        REG_DWORD_BIG_ENDIAN = 5, // 32-bit number
        REG_LINK = 6, // Symbolic Link =unicode
        REG_MULTI_SZ = 7, // Multiple Unicode strings
        REG_RESOURCE_LIST = 8, // Resource list in the resource map
        REG_FULL_RESOURCE_DESCRIPTOR = 9, // Resource list in the hardware description
        REG_RESOURCE_REQUIREMENTS_LIST = 10,
        REG_QWORD = 11, // 64-bit number
        REG_QWORD_LITTLE_ENDIAN = 11, // 64-bit number =same as REG_QWORD
    }

    [Flags]
    public enum RegLoadMUIStringFlags : uint
    {
        REG_MUI_STRING_TRUNCATE = 0x00000001,
    }

    [Flags]
    public enum RegRestoreKeyLoadHiveFlags : uint
    {
        REG_WHOLE_HIVE_VOLATILE = 0x00000001, // Restore whole hive volatile
        REG_REFRESH_HIVE = 0x00000002, // Unwind changes to last flush
        REG_NO_LAZY_FLUSH = 0x00000004, // Never lazy flush this hive
        REG_FORCE_RESTORE = 0x00000008, // Force the restore process even when we have open handles on subkeys
        REG_APP_HIVE = 0x00000010, // Loads the hive visible to the calling process
        REG_PROCESS_PRIVATE = 0x00000020, // Hive cannot be mounted by any other process while in use
        REG_START_JOURNAL = 0x00000040, // Starts Hive Journal
        REG_HIVE_EXACT_FILE_GROWTH = 0x00000080, // Grow hive file in exact 4k increments
        REG_HIVE_NO_RM = 0x00000100, // No RM is started for this hive (no transactions)
        REG_HIVE_SINGLE_LOG = 0x00000200, // Legacy single logging is used for this hive
        REG_BOOT_HIVE = 0x00000400, // This hive might be used by the OS loader
    }

    public enum RegSaveKeyFlags : uint
    {
        REG_STANDARD_FORMAT = 1,
        REG_LATEST_FORMAT = 2,
        REG_NO_COMPRESSION = 4,
    }

    [Flags]
    public enum REGSAM : uint
    {
        KEY_QUERY_VALUE = 0x0001,
        KEY_SET_VALUE = 0x0002,
        KEY_CREATE_SUB_KEY = 0x0004,
        KEY_ENUMERATE_SUB_KEYS = 0x0008,
        KEY_NOTIFY = 0x0010,
        KEY_CREATE_LINK = 0x0020,
        KEY_WOW64_32KEY = 0x0200,
        KEY_WOW64_64KEY = 0x0100,
        KEY_WOW64_RES = 0x0300,

        KEY_READ =
            (STANDARD_RIGHTS_READ |
            KEY_QUERY_VALUE |
            KEY_ENUMERATE_SUB_KEYS |
            KEY_NOTIFY &
          ~SYNCHRONIZE),

        KEY_WRITE =
            (STANDARD_RIGHTS_WRITE |
            KEY_SET_VALUE |
            KEY_CREATE_SUB_KEY &
            ~SYNCHRONIZE),

        KEY_EXECUTE =
            (KEY_READ &
            ~SYNCHRONIZE),

        KEY_ALL_ACCESS =
            (STANDARD_RIGHTS_ALL |
            KEY_QUERY_VALUE |
            KEY_SET_VALUE |
            KEY_CREATE_SUB_KEY |
            KEY_ENUMERATE_SUB_KEYS |
            KEY_NOTIFY |
            KEY_CREATE_LINK &
            ~SYNCHRONIZE),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    [Flags]
    public enum ResourceManagerAccessRights : uint
    {
        RESOURCEMANAGER_QUERY_INFORMATION = 0x0001,
        RESOURCEMANAGER_SET_INFORMATION = 0x0002,
        RESOURCEMANAGER_RECOVER = 0x0004,
        RESOURCEMANAGER_ENLIST = 0x0008,
        RESOURCEMANAGER_GET_NOTIFICATION = 0x0010,
        RESOURCEMANAGER_REGISTER_PROTOCOL = 0x0020,
        RESOURCEMANAGER_COMPLETE_PROPAGATION = 0x0040,

        RESOURCEMANAGER_GENERIC_READ =
            (STANDARD_RIGHTS_READ |
            RESOURCEMANAGER_QUERY_INFORMATION |
            SYNCHRONIZE),

        RESOURCEMANAGER_GENERIC_WRITE =
            (STANDARD_RIGHTS_WRITE |
            RESOURCEMANAGER_SET_INFORMATION |
            RESOURCEMANAGER_RECOVER |
            RESOURCEMANAGER_ENLIST |
            RESOURCEMANAGER_GET_NOTIFICATION |
            RESOURCEMANAGER_REGISTER_PROTOCOL |
            RESOURCEMANAGER_COMPLETE_PROPAGATION |
            SYNCHRONIZE),

        RESOURCEMANAGER_GENERIC_EXECUTE =
            (STANDARD_RIGHTS_EXECUTE |
            RESOURCEMANAGER_RECOVER |
            RESOURCEMANAGER_ENLIST |
            RESOURCEMANAGER_GET_NOTIFICATION |
            RESOURCEMANAGER_COMPLETE_PROPAGATION |
            SYNCHRONIZE),

        RESOURCEMANAGER_ALL_ACCESS =
            (STANDARD_RIGHTS_REQUIRED |
            RESOURCEMANAGER_GENERIC_READ |
            RESOURCEMANAGER_GENERIC_WRITE |
            RESOURCEMANAGER_GENERIC_EXECUTE),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    public enum RunDlgFlags : uint
    {
        RFF_NOBROWSE = 0x01,
        RFF_NODEFAULT = 0x02,
        RFF_CALCDIRECTORY = 0x04,
        RFF_NOLABEL = 0x08,
        RFF_NOSEPARATEMEM = 0x20,
    }

    public enum SC_ACTION_TYPE : int
    {
        SC_ACTION_NONE = 0,
        SC_ACTION_RESTART = 1,
        SC_ACTION_REBOOT = 2,
        SC_ACTION_RUN_COMMAND = 3,
    }

    public enum SC_ENUM_TYPE : int
    {
        SC_ENUM_PROCESS_INFO = 0,
    }

    public enum SC_STATUS_TYPE : int
    {
        SC_STATUS_PROCESS_INFO = 0,
    }

    public enum SCNRT_STATUS : int
    {
        SCNRT_ENABLE = 0,
        SCNRT_DISABLE = 1
    }

    public enum SCODE : int
    {
    }

    public enum ServiceControlCode : uint
    {
        SERVICE_CONTROL_STOP = 0x00000001,
        SERVICE_CONTROL_PAUSE = 0x00000002,
        SERVICE_CONTROL_CONTINUE = 0x00000003,
        SERVICE_CONTROL_INTERROGATE = 0x00000004,
        SERVICE_CONTROL_SHUTDOWN = 0x00000005,
        SERVICE_CONTROL_PARAMCHANGE = 0x00000006,
        SERVICE_CONTROL_NETBINDADD = 0x00000007,
        SERVICE_CONTROL_NETBINDREMOVE = 0x00000008,
        SERVICE_CONTROL_NETBINDENABLE = 0x00000009,
        SERVICE_CONTROL_NETBINDDISABLE = 0x0000000A,
        SERVICE_CONTROL_DEVICEEVENT = 0x0000000B,
        SERVICE_CONTROL_HARDWAREPROFILECHANGE = 0x0000000C,
        SERVICE_CONTROL_POWEREVENT = 0x0000000D,
        SERVICE_CONTROL_SESSIONCHANGE = 0x0000000E,
        SERVICE_CONTROL_PRESHUTDOWN = 0x0000000F,
        SERVICE_CONTROL_TIMECHANGE = 0x00000010,
        SERVICE_CONTROL_TRIGGEREVENT = 0x00000020,
    }

    [Flags]
    public enum ServiceControlsAccepted : uint
    {
        SERVICE_ACCEPT_STOP = 0x00000001,
        SERVICE_ACCEPT_PAUSE_CONTINUE = 0x00000002,
        SERVICE_ACCEPT_SHUTDOWN = 0x00000004,
        SERVICE_ACCEPT_PARAMCHANGE = 0x00000008,
        SERVICE_ACCEPT_NETBINDCHANGE = 0x00000010,
        SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 0x00000020,
        SERVICE_ACCEPT_POWEREVENT = 0x00000040,
        SERVICE_ACCEPT_SESSIONCHANGE = 0x00000080,
        SERVICE_ACCEPT_PRESHUTDOWN = 0x00000100,
        SERVICE_ACCEPT_TIMECHANGE = 0x00000200,
        SERVICE_ACCEPT_TRIGGEREVENT = 0x00000400,
    }

    [Flags]
    public enum ServiceFlags : uint
    {
        SERVICE_RUNS_IN_SYSTEM_PROCESS = 0x00000001,
    }

    public enum ServiceState : uint
    {
        SERVICE_STOPPED = 0x00000001,
        SERVICE_START_PENDING = 0x00000002,
        SERVICE_STOP_PENDING = 0x00000003,
        SERVICE_RUNNING = 0x00000004,
        SERVICE_CONTINUE_PENDING = 0x00000005,
        SERVICE_PAUSE_PENDING = 0x00000006,
        SERVICE_PAUSED = 0x00000007
    }

    [Flags]
    public enum SetWindowPosFlags : uint
    {
        SWP_ASYNCWINDOWPOS = 0x4000,
        SWP_DEFERERASE = 0x2000,
        SWP_DRAWFRAME = 0x0020,
        SWP_FRAMECHANGED = 0x0020,
        SWP_HIDEWINDOW = 0x0080,
        SWP_NOACTIVATE = 0x0010,
        SWP_NOCOPYBITS = 0x0100,
        SWP_NOMOVE = 0x0002,
        SWP_NOOWNERZORDER = 0x0200,
        SWP_NOREDRAW = 0x0008,
        SWP_NOREPOSITION = 0x0200,
        SWP_NOSENDCHANGING = 0x0400,
        SWP_NOSIZE = 0x0001,
        SWP_NOZORDER = 0x0004,
        SWP_SHOWWINDOW = 0x0040,
    }

    public enum SetWinEventHookFlags : uint
    {
        /// <summary>Events are ASYNC</summary>
        WINEVENT_OUTOFCONTEXT = 0x0000,
        /// <summary>Don't call back for events on installer's thread</summary>
        WINEVENT_SKIPOWNTHREAD = 0x0001,
        /// <summary>Don't call back for events on installer's process</summary>
        WINEVENT_SKIPOWNPROCESS = 0x0002,
        /// <summary>Events are SYNC, this causes your dll to be injected into every process</summary>
        WINEVENT_INCONTEXT = 0x0004,
    }

    public enum SECURITY_IMPERSONATION_LEVEL : int
    {
        SecurityAnonymous = 0,
        SecurityIdentification = 1,
        SecurityImpersonation = 2,
        SecurityDelegation = 3,
    }

    public enum SECURITY_INFORMATION : uint
    {
        OWNER_SECURITY_INFORMATION = 0x00000001,
        GROUP_SECURITY_INFORMATION = 0x00000002,
        DACL_SECURITY_INFORMATION = 0x00000004,
        SACL_SECURITY_INFORMATION = 0x00000008,
        LABEL_SECURITY_INFORMATION = 0x00000010,

        PROTECTED_DACL_SECURITY_INFORMATION = 0x80000000,
        PROTECTED_SACL_SECURITY_INFORMATION = 0x40000000,
        UNPROTECTED_DACL_SECURITY_INFORMATION = 0x20000000,
        UNPROTECTED_SACL_SECURITY_INFORMATION = 0x10000000,
    }

    [Flags]
    public enum ServiceAccessRights : uint
    {
        SERVICE_QUERY_CONFIG = 00001,
        SERVICE_CHANGE_CONFIG = 00002,
        SERVICE_QUERY_STATUS = 00004,
        SERVICE_ENUMERATE_DEPENDENTS = 00008,
        SERVICE_START = 00010,
        SERVICE_STOP = 00020,
        SERVICE_PAUSE_CONTINUE = 00040,
        SERVICE_INTERROGATE = 00080,
        SERVICE_USER_DEFINED_CONTROL = 00100,

        SERVICE_ALL_ACCESS =
            (STANDARD_RIGHTS_REQUIRED |
            SERVICE_QUERY_CONFIG |
            SERVICE_CHANGE_CONFIG |
            SERVICE_QUERY_STATUS |
            SERVICE_ENUMERATE_DEPENDENTS |
            SERVICE_START |
            SERVICE_STOP |
            SERVICE_PAUSE_CONTINUE |
            SERVICE_INTERROGATE |
            SERVICE_USER_DEFINED_CONTROL),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    public enum ServiceConfigInfoLevel : uint
    {
        SERVICE_CONFIG_DESCRIPTION = 1,
        SERVICE_CONFIG_FAILURE_ACTIONS = 2,
        SERVICE_CONFIG_DELAYED_AUTO_START_INFO = 3,
        SERVICE_CONFIG_FAILURE_ACTIONS_FLAG = 4,
        SERVICE_CONFIG_SERVICE_SID_INFO = 5,
        SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO = 6,
        SERVICE_CONFIG_PRESHUTDOWN_INFO = 7,
        SERVICE_CONFIG_TRIGGER_INFO = 8,
        SERVICE_CONFIG_PREFERRED_NODE = 9,
    }

    [Flags]
    public enum ServiceErrorControl : uint
    {
        SERVICE_ERROR_IGNORE = 0x00000000,
        SERVICE_ERROR_NORMAL = 0x00000001,
        SERVICE_ERROR_SEVERE = 0x00000002,
        SERVICE_ERROR_CRITICAL = 0x00000003,
    }

    [Flags]
    public enum ServiceStartType : uint
    {
        SERVICE_BOOT_START = 0x00000000,
        SERVICE_SYSTEM_START = 0x00000001,
        SERVICE_AUTO_START = 0x00000002,
        SERVICE_DEMAND_START = 0x00000003,
        SERVICE_DISABLED = 0x00000004,
    }

    [Flags]
    public enum ServiceType : uint
    {
        SERVICE_KERNEL_DRIVER = 0x00000001,
        SERVICE_FILE_SYSTEM_DRIVER = 0x00000002,
        SERVICE_ADAPTER = 0x00000004,
        SERVICE_RECOGNIZER_DRIVER = 0x00000008,

        SERVICE_DRIVER = (SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER),

        SERVICE_WIN32_OWN_PROCESS = 0x00000010,
        SERVICE_WIN32_SHARE_PROCESS = 0x00000020,
        SERVICE_WIN32 = (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS),

        SERVICE_INTERACTIVE_PROCESS = 0x00000100,

        SERVICE_TYPE_ALL = (SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS),
    }

    [Flags]
    public enum ServiceManagerAccessRights : uint
    {
        SC_MANAGER_CONNECT = 00001,
        SC_MANAGER_CREATE_SERVICE = 00002,
        SC_MANAGER_ENUMERATE_SERVICE = 00004,
        SC_MANAGER_LOCK = 00008,
        SC_MANAGER_QUERY_LOCK_STATUS = 00010,
        SC_MANAGER_MODIFY_BOOT_CONFIG = 00020,

        SC_MANAGER_ALL_ACCESS =
            (STANDARD_RIGHTS_REQUIRED |
            SC_MANAGER_CONNECT |
            SC_MANAGER_CREATE_SERVICE |
            SC_MANAGER_ENUMERATE_SERVICE |
            SC_MANAGER_LOCK |
            SC_MANAGER_QUERY_LOCK_STATUS |
            SC_MANAGER_MODIFY_BOOT_CONFIG),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    [Flags]
    public enum SFBS_FLAGS : int
    {
        SFBS_FLAGS_ROUND_TO_NEAREST_DISPLAYED_DIGIT = 0x00000001,
        SFBS_FLAGS_TRUNCATE_UNDISPLAYED_DECIMAL_DIGITS = 0x00000002,
    }

    [Flags]
    public enum SFGAOF : uint
    {
        SFGAO_CANCOPY = 0x00000001,// Objects can be copied    (0x1)
        SFGAO_CANMOVE = 0x00000002,// Objects can be moved     (0x2)
        SFGAO_CANLINK = 0x00000004,// Objects can be linked    (0x4)
        SFGAO_STORAGE = 0x00000008,   // supports BindToObject(IID_IStorage)
        SFGAO_CANRENAME = 0x00000010,   // Objects can be renamed
        SFGAO_CANDELETE = 0x00000020,   // Objects can be deleted
        SFGAO_HASPROPSHEET = 0x00000040,   // Objects have property sheets
        SFGAO_DROPTARGET = 0x00000100,   // Objects are drop target
        SFGAO_SYSTEM = 0x00001000,   // System object
        SFGAO_ENCRYPTED = 0x00002000,   // Object is encrypted (use alt color)
        SFGAO_ISSLOW = 0x00004000,   // 'Slow' object
        SFGAO_GHOSTED = 0x00008000,   // Ghosted icon
        SFGAO_LINK = 0x00010000,   // Shortcut (link)
        SFGAO_SHARE = 0x00020000,   // Shared
        SFGAO_READONLY = 0x00040000,   // Read-only
        SFGAO_HIDDEN = 0x00080000,   // Hidden object
        SFGAO_FILESYSANCESTOR = 0x10000000,   // May contain children with SFGAO_FILESYSTEM
        SFGAO_FOLDER = 0x20000000,   // Support BindToObject(IID_IShellFolder)
        SFGAO_FILESYSTEM = 0x40000000,   // Is a win32 file system object (file/folder/root)
        SFGAO_HASSUBFOLDER = 0x80000000,   // May contain children with SFGAO_FOLDER (may be slow)
        SFGAO_VALIDATE = 0x01000000,   // Invalidate cached information (may be slow)
        SFGAO_REMOVABLE = 0x02000000,   // Is this removeable media?
        SFGAO_COMPRESSED = 0x04000000,   // Object is compressed (use alt color)
        SFGAO_BROWSABLE = 0x08000000,   // Supports IShellFolder, but only implements CreateViewObject() (non-folder view)
        SFGAO_NONENUMERATED = 0x00100000,   // Is a non-enumerated object (should be hidden)
        SFGAO_NEWCONTENT = 0x00200000,   // Should show bold in explorer tree
        [Obsolete]
        SFGAO_CANMONIKER = 0x00400000,   // Obsolete
        [Obsolete]
        SFGAO_HASSTORAGE = 0x00400000,   // Obsolete
        SFGAO_STREAM = 0x00400000,   // Supports BindToObject(IID_IStream)
        SFGAO_STORAGEANCESTOR = 0x00800000,   // May contain children with SFGAO_STORAGE or SFGAO_STREAM

        // TODO: Push these to SHELL32 class because they are masks not flags.
        SFGAO_CONTENTSMASK = 0x80000000,
        SFGAO_DISPLAYATTRMASK = 0x000FC000,
        SFGAO_CAPABILITYMASK = 0x00000177,
        SFGAO_STORAGECAPMASK = 0x70C50008,   // For determining storage capabilities, ie for open/save semantics
        SFGAO_PKEYSFGAOMASK = 0x81044000,   // Attributes that are masked out for PKEY_SFGAOFlags because they are considered to cause slow calculations or lack context (SFGAO_VALIDATE | SFGAO_ISSLOW | SFGAO_HASSUBFOLDER and others)
    }

    [Flags]
    public enum SHCIDS : uint
    {
        SHCIDS_ALLFIELDS = 0x80000000,
        SHCIDS_CANONICALONLY = 0x10000000,
        SHCIDS_BITMASK = 0xFFFF0000,
        SHCIDS_COLUMNMASK = 0x0000FFFF,
    }

    /// <summary>
    /// typedef SHCONT
    /// ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/shellcc/platform/shell/reference/enums/shcontf.htm#SHCONTF_ENABLE_ASYNC
    /// </summary>
    [Flags]
    public enum SHCONTF : uint
    {
        SHCONTF_CHECKING_FOR_CHILDREN = 0x10,
        SHCONTF_FOLDERS = 0x20,
        SHCONTF_NONFOLDERS = 0x40,
        SHCONTF_INCLUDEHIDDEN = 0x80,
        SHCONTF_INIT_ON_FIRST_NEXT = 0x100,
        SHCONTF_NETPRINTERSRCH = 0x200,
        SHCONTF_SHAREABLE = 0x400,
        SHCONTF_STORAGE = 0x800,
        SHCONTF_NAVIGATION_ENUM = 0x1000,
        SHCONTF_FASTITEMS = 0x2000,
        SHCONTF_FLATLIST = 0x4000,
        SHCONTF_ENABLE_ASYNC = 0x8000,
        SHCONTF_INCLUDESUPERHIDDEN = 0x10000,
    }

    [Flags]
    public enum SHCT_FLAGS : uint
    {
        CTF_INSIST = 0x00000001,   // call pfnThreadProc synchronously if CreateThread() fails
        CTF_THREAD_REF = 0x00000002,   // hold a reference to the creating thread
        CTF_PROCESS_REF = 0x00000004,   // hold a reference to the creating process
        CTF_COINIT_STA = 0x00000008,   // init COM as STA for the created thread
        CTF_FREELIBANDEXIT = 0x00000010,   // hold a ref to the DLL and call FreeLibraryAndExitThread() when done
        CTF_REF_COUNTED = 0x00000020,   // thread supports ref counting via SHGetThreadRef() or CTF_THREAD_REF so that child threads can keep this thread alive
        CTF_WAIT_ALLOWCOM = 0x00000040,   // while waiting for pfnCallback, allow COM marshaling to the blocked calling thread
        CTF_UNUSED = 0x00000080,
        CTF_INHERITWOW64 = 0x00000100,   // new thread should inherit the wow64 disable state for the file system redirector
        CTF_WAIT_NO_REENTRANCY = 0x00000200,   // don't allow re-entrancy when waiting for the sync proc, this won't work with marshalled objects or SendMessages() from the sync proc
        CTF_KEYBOARD_LOCALE = 0x00000400,   // carry the keyboard locale from creating to created thread
        CTF_OLEINITIALIZE = 0x00000800,   // init OLE on the created thread (this will also init COM as STA)
        CTF_COINIT_MTA = 0x00001000,   // init COM as MTA for the created thread
        /// <summary>
        /// this flag is the opposite of CTF_FREELIBANDEXIT that is now implicit as of Vista
        /// this avoids the LoadLibrary/FreeLibraryAndExitThread calls that result in contention for the loader lock
        /// only use this when the thread being created has some other means to ensure that the code
        /// of the thread proc will remain loaded. This should not be used in the context of COM objects as those
        /// need to ensure that the DLL stays loaded as COM will unload DLLs
        /// </summary>
        CTF_NOADDREFLIB = 0x00002000,
    }

    [Flags]
    public enum ShellFileOperationCode : uint
    {
        FO_MOVE = 0x0001,
        FO_COPY = 0x0002,
        FO_DELETE = 0x0003,
        FO_RENAME = 0x0004,
    }

    /// <summary>
    /// Undocumented.
    /// </summary>
    public enum ShellHookCode : ushort
    {
        WindowCreated = 01,
        WindowDestroyed = 02,
        ActivateShellWindow = 03,
        WindowActivated = 04,
        GetMinRect = 05,
        Redraw = 06,
        TaskMan = 07,
        Language = 08,
        AccessibilityState = 11,
        AppCommand = 12,
    }

    /// <summary>
    /// typedef SHGNO
    /// ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/wceshellui5/html/wce50lrfSHGNO.htm
    /// </summary>
    [Flags]
    public enum SHGDNF : uint
    {
        SHGDN_NORMAL = 0,
        SHGDN_INFOLDER = 0x1,
        SHGDN_FOREDITING = 0x1000,
        SHGDN_FORADDRESSBAR = 0x4000,
        SHGDN_FORPARSING = 0x8000,
    }

    public enum SHGFP_TYPE : int
    {
        SHGFP_TYPE_CURRENT = 0,   // current value for user, verify it exists
        SHGFP_TYPE_DEFAULT = 1,   // default value, may not exist
    }

    public enum ShowWindowCommand : int
    {
        SW_HIDE = 0,
        SW_SHOWNORMAL = 1,
        SW_SHOWMINIMIZED = 2,
        SW_SHOWMAXIMIZED = 3,
        SW_SHOWNOACTIVATE = 4,
        SW_SHOW = 5,
        SW_MINIMIZE = 6,
        SW_SHOWMINNOACTIVE = 7,
        SW_SHOWNA = 8,
        SW_RESTORE = 9,
        SW_SHOWDEFAULT = 10,
        SW_FORCEMINIMIZE = 11,
    }

    [Flags]
    public enum SIATTRIBFLAGS : int
    {
        SIATTRIBFLAGS_AND = 0x1,
        SIATTRIBFLAGS_OR = 0x2,
        SIATTRIBFLAGS_APPCOMPAT = 0x3,
        SIATTRIBFLAGS_MASK = 0x3,
        SIATTRIBFLAGS_ALLITEMS = 0x4000,
    }

    [Flags]
    public enum SICHINTF : uint
    {
        SICHINT_DISPLAY = 0,
        SICHINT_ALLFIELDS = 0x80000000,
        SICHINT_CANONICAL = 0x10000000,
        SICHINT_TEST_FILESYSPATH_IF_NOT_EQUAL = 0x20000000,
    }

    /// <summary>
    /// Originally typed as an int, but we force the uint to avoid needing the unchecked keyword.
    /// </summary>
    public enum SIGDN : uint
    {
        SIGDN_NORMALDISPLAY = 0,
        SIGDN_PARENTRELATIVEPARSING = 0x80018001,
        SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000,
        SIGDN_PARENTRELATIVEEDITING = 0x80031001,
        SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000,
        SIGDN_FILESYSPATH = 0x80058000,
        SIGDN_URL = 0x80068000,
        SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8007c001,
        SIGDN_PARENTRELATIVE = 0x80080001,
    }

    public enum SHARD : uint
    {
        SHARD_PIDL = 0x00000001,
        SHARD_PATHA = 0x00000002,
        SHARD_PATHW = 0x00000003,
        SHARD_APPIDINFO = 0x00000004,
        SHARD_APPIDINFOIDLIST = 0x00000005,
        SHARD_LINK = 0x00000006,
        SHARD_APPIDINFOLINK = 0x00000007,
        SHARD_SHELLITEM = 0x00000008
    }

    [Flags]
    public enum SHCNE : uint
    {
        SHCNE_RENAMEITEM = 0x00000001,
        SHCNE_CREATE = 0x00000002,
        SHCNE_DELETE = 0x00000004,
        SHCNE_MKDIR = 0x00000008,
        SHCNE_RMDIR = 0x00000010,
        SHCNE_MEDIAINSERTED = 0x00000020,
        SHCNE_MEDIAREMOVED = 0x00000040,
        SHCNE_DRIVEREMOVED = 0x00000080,
        SHCNE_DRIVEADD = 0x00000100,
        SHCNE_NETSHARE = 0x00000200,
        SHCNE_NETUNSHARE = 0x00000400,
        SHCNE_ATTRIBUTES = 0x00000800,
        SHCNE_UPDATEDIR = 0x00001000,
        SHCNE_UPDATEITEM = 0x00002000,
        SHCNE_SERVERDISCONNECT = 0x00004000,
        SHCNE_UPDATEIMAGE = 0x00008000,
        SHCNE_DRIVEADDGUI = 0x00010000,
        SHCNE_RENAMEFOLDER = 0x00020000,
        SHCNE_FREESPACE = 0x00040000,
        /// <summary>
        /// SHCNE_EXTENDED_EVENT: the extended event is identified in dwItem1,
        /// packed in LPITEMIDLIST format (same as SHCNF_DWORD packing).
        /// Additional information can be passed in the dwItem2 parameter
        /// of SHChangeNotify (called "pidl2" below), which if present, must also
        /// be in LPITEMIDLIST format.
        ///
        /// Unlike the standard events, the extended events are ORDINALs, so we
        /// don't run out of bits.  Extended events follow the SHCNEE_* naming
        /// convention.
        ///
        /// The dwItem2 parameter varies according to the extended event.
        /// </summary>
        SHCNE_EXTENDED_EVENT = 0x04000000,
        SHCNE_ASSOCCHANGED = 0x08000000,
        SHCNE_DISKEVENTS = 0x0002381F,
        SHCNE_GLOBALEVENTS = 0x0C0581E0, // Events that dont match pidls first
        SHCNE_ALLEVENTS = 0x7FFFFFFF,
        /// <summary>
        /// The presence of this flag indicates that the event was generated by an
        /// interrupt.  It is stripped out before the clients of SHCNNotify_ see it.
        /// </summary>
        SHCNE_INTERRUPT = 0x80000000,
        SHCNEE_ORDERCHANGED = 2,  // pidl2 is the changed folder
        SHCNEE_MSI_CHANGE = 4,  // pidl2 is a SHChangeProductKeyAsIDList
        SHCNEE_MSI_UNINSTALL = 5,  // pidl2 is a SHChangeProductKeyAsIDList
    }

    public enum SHCNF : int
    {
        SHCNF_IDLIST = 0x0000, // LPITEMIDLIST
        SHCNF_PATHA = 0x0001, // path name
        SHCNF_PRINTERA = 0x0002, // printer friendly name
        SHCNF_DWORD = 0x0003, // DWORD
        SHCNF_PATHW = 0x0005, // path name
        SHCNF_PRINTERW = 0x0006, // printer friendly name
        SHCNF_TYPE = 0x00FF,
        SHCNF_FLUSH = 0x1000,
        SHCNF_FLUSHNOWAIT = 0x3000, // includes SHCNF_FLUSH
        SHCNF_NOTIFYRECURSIVE = 0x10000, // Notify clients registered for any child
    }

    [Flags]
    public enum SHCNRF : int
    {
        SHCNRF_InterruptLevel = 0x0001,
        SHCNRF_ShellLevel = 0x0002,
        SHCNRF_RecursiveInterrupt = 0x1000,
        SHCNRF_NewDelivery = 0x8000,
    }

    [Flags]
    public enum SHERB : uint
    {
        SHERB_NOCONFIRMATION = 0x00000001,
        SHERB_NOPROGRESSUI = 0x00000002,
        SHERB_NOSOUND = 0x00000004,
    }

    [Flags]
    public enum ShutdownReason : uint
    {
        // Flags used by the various UIs.
        SHTDN_REASON_FLAG_COMMENT_REQUIRED = 0x01000000,
        SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED = 0x02000000,
        SHTDN_REASON_FLAG_CLEAN_UI = 0x04000000,
        SHTDN_REASON_FLAG_DIRTY_UI = 0x08000000,

        // Flags that end up in the event log code.
        SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000,
        SHTDN_REASON_FLAG_PLANNED = 0x80000000,

        // Microsoft major reasons.
        SHTDN_REASON_MAJOR_OTHER = 0x00000000,
        SHTDN_REASON_MAJOR_NONE = 0x00000000,
        SHTDN_REASON_MAJOR_HARDWARE = 0x00010000,
        SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000,
        SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000,
        SHTDN_REASON_MAJOR_APPLICATION = 0x00040000,
        SHTDN_REASON_MAJOR_SYSTEM = 0x00050000,
        SHTDN_REASON_MAJOR_POWER = 0x00060000,
        SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000,

        // Microsoft minor reasons.
        SHTDN_REASON_MINOR_OTHER = 0x00000000,
        SHTDN_REASON_MINOR_NONE = 0x000000ff,
        SHTDN_REASON_MINOR_MAINTENANCE = 0x00000001,
        SHTDN_REASON_MINOR_INSTALLATION = 0x00000002,
        SHTDN_REASON_MINOR_UPGRADE = 0x00000003,
        SHTDN_REASON_MINOR_RECONFIG = 0x00000004,
        SHTDN_REASON_MINOR_HUNG = 0x00000005,
        SHTDN_REASON_MINOR_UNSTABLE = 0x00000006,
        SHTDN_REASON_MINOR_DISK = 0x00000007,
        SHTDN_REASON_MINOR_PROCESSOR = 0x00000008,
        SHTDN_REASON_MINOR_NETWORKCARD = 0x00000009,
        SHTDN_REASON_MINOR_POWER_SUPPLY = 0x0000000a,
        SHTDN_REASON_MINOR_CORDUNPLUGGED = 0x0000000b,
        SHTDN_REASON_MINOR_ENVIRONMENT = 0x0000000c,
        SHTDN_REASON_MINOR_HARDWARE_DRIVER = 0x0000000d,
        SHTDN_REASON_MINOR_OTHERDRIVER = 0x0000000e,
        SHTDN_REASON_MINOR_BLUESCREEN = 0x0000000F,
        SHTDN_REASON_MINOR_SERVICEPACK = 0x00000010,
        SHTDN_REASON_MINOR_HOTFIX = 0x00000011,
        SHTDN_REASON_MINOR_SECURITYFIX = 0x00000012,
        SHTDN_REASON_MINOR_SECURITY = 0x00000013,
        SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014,
        SHTDN_REASON_MINOR_WMI = 0x00000015,
        SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = 0x00000016,
        SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = 0x00000017,
        SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = 0x00000018,
        SHTDN_REASON_MINOR_MMC = 0x00000019,
        SHTDN_REASON_MINOR_SYSTEMRESTORE = 0x0000001a,
        SHTDN_REASON_MINOR_TERMSRV = 0x00000020,
        SHTDN_REASON_MINOR_DC_PROMOTION = 0x00000021,
        SHTDN_REASON_MINOR_DC_DEMOTION = 0x00000022,
    }

    [Flags]
    public enum SLGP_FLAGS : uint
    {
        SLGP_SHORTPATH = 0x1,
        SLGP_UNCPRIORITY = 0x2,
        SLGP_RAWPATH = 0x4,
        SLGP_RELATIVEPRIORITY = 0x8,
    }

    [Flags]
    public enum SLR_FLAGS : uint
    {
        SLR_NO_UI = 0x1,
        SLR_ANY_MATCH = 0x2,
        SLR_UPDATE = 0x4,
        SLR_NOUPDATE = 0x8,
        SLR_NOSEARCH = 0x10,
        SLR_NOTRACK = 0x20,
        SLR_NOLINKINFO = 0x40,
        SLR_INVOKE_MSI = 0x80,
        SLR_NO_UI_WITH_MSG_PUMP = 0x101,
        SLR_OFFER_DELETE_WITHOUT_FILE = 0x200,
        SLR_KNOWNFOLDER = 0x400,
        SLR_MACHINE_IN_LOCAL_TARGET = 0x800,
        SLR_UPDATE_MACHINE_AND_SID = 0x1000
    }

    [Flags]
    public enum SnapshotFlags : uint
    {
        TH32CS_SNAPHEAPLIST = 0x00000001,
        TH32CS_SNAPPROCESS = 0x00000002,
        TH32CS_SNAPTHREAD = 0x00000004,
        TH32CS_SNAPMODULE = 0x00000008,
        TH32CS_SNAPMODULE32 = 0x00000010,
        TH32CS_INHERIT = 0x80000000,
        TH32CS_SNAPALL = 0x0000001F
    }

    public enum SortLanguageId : byte
    {
        SORT_DEFAULT = 0x0, // sorting default

        SORT_INVARIANT_MATH = 0x1, // Invariant (Mathematical Symbols)

        SORT_JAPANESE_XJIS = 0x0, // Japanese XJIS order
        SORT_JAPANESE_UNICODE = 0x1, // Japanese Unicode order (no longer supported)
        SORT_JAPANESE_RADICALSTROKE = 0x4, // Japanese radical/stroke order

        SORT_CHINESE_BIG5 = 0x0, // Chinese BIG5 order
        SORT_CHINESE_PRCP = 0x0, // PRC Chinese Phonetic order
        SORT_CHINESE_UNICODE = 0x1, // Chinese Unicode order (no longer supported)
        SORT_CHINESE_PRC = 0x2, // PRC Chinese Stroke Count order
        SORT_CHINESE_BOPOMOFO = 0x3, // Traditional Chinese Bopomofo order
        SORT_CHINESE_RADICALSTROKE = 0x4, // Traditional Chinese radical/stroke order.

        SORT_KOREAN_KSC = 0x0, // Korean KSC order
        SORT_KOREAN_UNICODE = 0x1, // Korean Unicode order (no longer supported)

        SORT_GERMAN_PHONE_BOOK = 0x1, // German Phone Book order

        SORT_HUNGARIAN_DEFAULT = 0x0, // Hungarian Default order
        SORT_HUNGARIAN_TECHNICAL = 0x1, // Hungarian Technical order

        SORT_GEORGIAN_TRADITIONAL = 0x0, // Georgian Traditional order
        SORT_GEORGIAN_MODERN = 0x1, // Georgian Modern order
    }

    /// <summary>
    /// Other *AccessRights enumerations can be said to inherit from this one, if only .NET would support it directly.
    /// </summary>
    [Flags]
    public enum StandardAccessRights : uint
    {
        /// <summary>Required to delete the object.</summary>
        DELETE = 0x00010000,
        /// <summary>Required to read information in the security descriptor for the object, not including the information in the SACL. To read or write the SACL, you must request the ACCESS_SYSTEM_SECURITY access right. For more information, see SACL Access Right.</summary>
        READ_CONTROL = 0x00020000,
        /// <summary>Not supported for desktop objects.</summary>
        SYNCHRONIZE = 0x00100000,
        /// <summary>Required to modify the DACL in the security descriptor for the object.</summary>
        WRITE_DAC = 0x00040000,
        /// <summary>Required to change the owner in the security descriptor for the object.</summary>
        WRITE_OWNER = 0x00080000,
        STANDARD_RIGHTS_ALL = DELETE | READ_CONTROL | WRITE_DAC | WRITE_OWNER | SYNCHRONIZE,
        STANDARD_RIGHTS_EXECUTE = READ_CONTROL,
        STANDARD_RIGHTS_READ = READ_CONTROL,
        STANDARD_RIGHTS_REQUIRED = DELETE | READ_CONTROL | WRITE_DAC | WRITE_OWNER,
        STANDARD_RIGHTS_WRITE = READ_CONTROL,
        GENERIC_ALL = 0x10000000,
        GENERIC_EXECUTE = 0x20000000,
        GENERIC_WRITE = 0x40000000,
        GENERIC_READ = 0x80000000,
    }

    public enum StandardHandles : uint
    {
        STD_INPUT_HANDLE = unchecked((uint)-10),
        STD_OUTPUT_HANDLE = unchecked((uint)-11),
        STD_ERROR_HANDLE = unchecked((uint)-12),
    }

    public enum STREAM_INFO_LEVELS : int
    {
        FindStreamInfoStandard = 0,
        FindStreamInfoMaxInfoLevel = 1,
    }

    public enum STRRET_TYPE : uint
    {
        STRRET_WSTR = 0,
        STRRET_OFFSET = 0x1,
        STRRET_CSTR = 0x2
    }

    public enum SubLanguageId : byte
    {
        SUBLANG_NEUTRAL = 0x00, // language neutral
        SUBLANG_DEFAULT = 0x01, // user default
        SUBLANG_SYS_DEFAULT = 0x02, // system default
        SUBLANG_CUSTOM_DEFAULT = 0x03, // default custom language/locale
        SUBLANG_CUSTOM_UNSPECIFIED = 0x04, // custom language/locale
        SUBLANG_UI_CUSTOM_DEFAULT = 0x05, // Default custom MUI language/locale
        SUBLANG_AFRIKAANS_SOUTH_AFRICA = 0x01, // Afrikaans (South Africa) =0x0436 af-ZA
        SUBLANG_ALBANIAN_ALBANIA = 0x01, // Albanian (Albania) =0x041c sq-AL
        SUBLANG_ALSATIAN_FRANCE = 0x01, // Alsatian (France) =0x0484
        SUBLANG_AMHARIC_ETHIOPIA = 0x01, // Amharic (Ethiopia) =0x045e
        SUBLANG_ARABIC_SAUDI_ARABIA = 0x01, // Arabic (Saudi Arabia)
        SUBLANG_ARABIC_IRAQ = 0x02, // Arabic (Iraq)
        SUBLANG_ARABIC_EGYPT = 0x03, // Arabic (Egypt)
        SUBLANG_ARABIC_LIBYA = 0x04, // Arabic (Libya)
        SUBLANG_ARABIC_ALGERIA = 0x05, // Arabic (Algeria)
        SUBLANG_ARABIC_MOROCCO = 0x06, // Arabic (Morocco)
        SUBLANG_ARABIC_TUNISIA = 0x07, // Arabic (Tunisia)
        SUBLANG_ARABIC_OMAN = 0x08, // Arabic (Oman)
        SUBLANG_ARABIC_YEMEN = 0x09, // Arabic (Yemen)
        SUBLANG_ARABIC_SYRIA = 0x0a, // Arabic (Syria)
        SUBLANG_ARABIC_JORDAN = 0x0b, // Arabic (Jordan)
        SUBLANG_ARABIC_LEBANON = 0x0c, // Arabic (Lebanon)
        SUBLANG_ARABIC_KUWAIT = 0x0d, // Arabic (Kuwait)
        SUBLANG_ARABIC_UAE = 0x0e, // Arabic (U.A.E)
        SUBLANG_ARABIC_BAHRAIN = 0x0f, // Arabic (Bahrain)
        SUBLANG_ARABIC_QATAR = 0x10, // Arabic (Qatar)
        SUBLANG_ARMENIAN_ARMENIA = 0x01, // Armenian (Armenia) =0x042b hy-AM
        SUBLANG_ASSAMESE_INDIA = 0x01, // Assamese (India) =0x044d
        SUBLANG_AZERI_LATIN = 0x01, // Azeri (Latin)
        SUBLANG_AZERI_CYRILLIC = 0x02, // Azeri (Cyrillic)
        SUBLANG_BASHKIR_RUSSIA = 0x01, // Bashkir (Russia) =0x046d ba-RU
        SUBLANG_BASQUE_BASQUE = 0x01, // Basque (Basque) =0x042d eu-ES
        SUBLANG_BELARUSIAN_BELARUS = 0x01, // Belarusian (Belarus) =0x0423 be-BY
        SUBLANG_BENGALI_INDIA = 0x01, // Bengali (India)
        SUBLANG_BENGALI_BANGLADESH = 0x02, // Bengali (Bangladesh)
        SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN = 0x05, // Bosnian (Bosnia and Herzegovina - Latin) =0x141a bs-BA-Latn
        SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x08, // Bosnian (Bosnia and Herzegovina - Cyrillic) =0x201a bs-BA-Cyrl
        SUBLANG_BRETON_FRANCE = 0x01, // Breton (France) =0x047e
        SUBLANG_BULGARIAN_BULGARIA = 0x01, // Bulgarian (Bulgaria) =0x0402
        SUBLANG_CATALAN_CATALAN = 0x01, // Catalan (Catalan) =0x0403
        SUBLANG_CHINESE_TRADITIONAL = 0x01, // Chinese (Taiwan) =0x0404 zh-TW
        SUBLANG_CHINESE_SIMPLIFIED = 0x02, // Chinese (PR China) =0x0804 zh-CN
        SUBLANG_CHINESE_HONGKONG = 0x03, // Chinese (Hong Kong S.A.R., P.R.C.) =0x0c04 zh-HK
        SUBLANG_CHINESE_SINGAPORE = 0x04, // Chinese (Singapore) =0x1004 zh-SG
        SUBLANG_CHINESE_MACAU = 0x05, // Chinese (Macau S.A.R.) =0x1404 zh-MO
        SUBLANG_CORSICAN_FRANCE = 0x01, // Corsican (France) =0x0483
        SUBLANG_CZECH_CZECH_REPUBLIC = 0x01, // Czech (Czech Republic) =0x0405
        SUBLANG_CROATIAN_CROATIA = 0x01, // Croatian (Croatia)
        SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN = 0x04, // Croatian (Bosnia and Herzegovina - Latin) =0x101a hr-BA
        SUBLANG_DANISH_DENMARK = 0x01, // Danish (Denmark) =0x0406
        SUBLANG_DARI_AFGHANISTAN = 0x01, // Dari (Afghanistan)
        SUBLANG_DIVEHI_MALDIVES = 0x01, // Divehi (Maldives) =0x0465 div-MV
        SUBLANG_DUTCH = 0x01, // Dutch
        SUBLANG_DUTCH_BELGIAN = 0x02, // Dutch (Belgian)
        SUBLANG_ENGLISH_US = 0x01, // English (USA)
        SUBLANG_ENGLISH_UK = 0x02, // English (UK)
        SUBLANG_ENGLISH_AUS = 0x03, // English (Australian)
        SUBLANG_ENGLISH_CAN = 0x04, // English (Canadian)
        SUBLANG_ENGLISH_NZ = 0x05, // English (New Zealand)
        SUBLANG_ENGLISH_EIRE = 0x06, // English (Irish)
        SUBLANG_ENGLISH_SOUTH_AFRICA = 0x07, // English (South Africa)
        SUBLANG_ENGLISH_JAMAICA = 0x08, // English (Jamaica)
        SUBLANG_ENGLISH_CARIBBEAN = 0x09, // English (Caribbean)
        SUBLANG_ENGLISH_BELIZE = 0x0a, // English (Belize)
        SUBLANG_ENGLISH_TRINIDAD = 0x0b, // English (Trinidad)
        SUBLANG_ENGLISH_ZIMBABWE = 0x0c, // English (Zimbabwe)
        SUBLANG_ENGLISH_PHILIPPINES = 0x0d, // English (Philippines)
        SUBLANG_ENGLISH_INDIA = 0x10, // English (India)
        SUBLANG_ENGLISH_MALAYSIA = 0x11, // English (Malaysia)
        SUBLANG_ENGLISH_SINGAPORE = 0x12, // English (Singapore)
        SUBLANG_ESTONIAN_ESTONIA = 0x01, // Estonian (Estonia) =0x0425 et-EE
        SUBLANG_FAEROESE_FAROE_ISLANDS = 0x01, // Faroese (Faroe Islands) =0x0438 fo-FO
        SUBLANG_FILIPINO_PHILIPPINES = 0x01, // Filipino (Philippines) =0x0464 fil-PH
        SUBLANG_FINNISH_FINLAND = 0x01, // Finnish (Finland) =0x040b
        SUBLANG_FRENCH = 0x01, // French
        SUBLANG_FRENCH_BELGIAN = 0x02, // French (Belgian)
        SUBLANG_FRENCH_CANADIAN = 0x03, // French (Canadian)
        SUBLANG_FRENCH_SWISS = 0x04, // French (Swiss)
        SUBLANG_FRENCH_LUXEMBOURG = 0x05, // French (Luxembourg)
        SUBLANG_FRENCH_MONACO = 0x06, // French (Monaco)
        SUBLANG_FRISIAN_NETHERLANDS = 0x01, // Frisian (Netherlands) =0x0462 fy-NL
        SUBLANG_GALICIAN_GALICIAN = 0x01, // Galician (Galician) =0x0456 gl-ES
        SUBLANG_GEORGIAN_GEORGIA = 0x01, // Georgian (Georgia) =0x0437 ka-GE
        SUBLANG_GERMAN = 0x01, // German
        SUBLANG_GERMAN_SWISS = 0x02, // German (Swiss)
        SUBLANG_GERMAN_AUSTRIAN = 0x03, // German (Austrian)
        SUBLANG_GERMAN_LUXEMBOURG = 0x04, // German (Luxembourg)
        SUBLANG_GERMAN_LIECHTENSTEIN = 0x05, // German (Liechtenstein)
        SUBLANG_GREEK_GREECE = 0x01, // Greek (Greece)
        SUBLANG_GREENLANDIC_GREENLAND = 0x01, // Greenlandic (Greenland) =0x046f kl-GL
        SUBLANG_GUJARATI_INDIA = 0x01, // Gujarati (India (Gujarati Script)) =0x0447 gu-IN
        SUBLANG_HAUSA_NIGERIA_LATIN = 0x01, // Hausa (Latin, Nigeria) =0x0468 ha-NG-Latn
        SUBLANG_HEBREW_ISRAEL = 0x01, // Hebrew (Israel) =0x040d
        SUBLANG_HINDI_INDIA = 0x01, // Hindi (India) =0x0439 hi-IN
        SUBLANG_HUNGARIAN_HUNGARY = 0x01, // Hungarian (Hungary) =0x040e
        SUBLANG_ICELANDIC_ICELAND = 0x01, // Icelandic (Iceland) =0x040f
        SUBLANG_IGBO_NIGERIA = 0x01, // Igbo (Nigeria) =0x0470 ig-NG
        SUBLANG_INDONESIAN_INDONESIA = 0x01, // Indonesian (Indonesia) =0x0421 id-ID
        SUBLANG_INUKTITUT_CANADA = 0x01, // Inuktitut (Syllabics) (Canada) =0x045d iu-CA-Cans
        SUBLANG_INUKTITUT_CANADA_LATIN = 0x02, // Inuktitut (Canada - Latin)
        SUBLANG_IRISH_IRELAND = 0x02, // Irish (Ireland)
        SUBLANG_ITALIAN = 0x01, // Italian
        SUBLANG_ITALIAN_SWISS = 0x02, // Italian (Swiss)
        SUBLANG_JAPANESE_JAPAN = 0x01, // Japanese (Japan) =0x0411
        SUBLANG_KANNADA_INDIA = 0x01, // Kannada (India (Kannada Script)) =0x044b kn-IN
        SUBLANG_KASHMIRI_SASIA = 0x02, // Kashmiri (South Asia)
        SUBLANG_KASHMIRI_INDIA = 0x02, // For app compatibility only
        SUBLANG_KAZAK_KAZAKHSTAN = 0x01, // Kazakh (Kazakhstan) =0x043f kk-KZ
        SUBLANG_KHMER_CAMBODIA = 0x01, // Khmer (Cambodia) =0x0453 kh-KH
        SUBLANG_KICHE_GUATEMALA = 0x01, // K'iche (Guatemala)
        SUBLANG_KINYARWANDA_RWANDA = 0x01, // Kinyarwanda (Rwanda) =0x0487 rw-RW
        SUBLANG_KONKANI_INDIA = 0x01, // Konkani (India) =0x0457 kok-IN
        SUBLANG_KOREAN = 0x01, // Korean (Extended Wansung)
        SUBLANG_KYRGYZ_KYRGYZSTAN = 0x01, // Kyrgyz (Kyrgyzstan) =0x0440 ky-KG
        SUBLANG_LAO_LAO = 0x01, // Lao (Lao PDR) =0x0454 lo-LA
        SUBLANG_LATVIAN_LATVIA = 0x01, // Latvian (Latvia) =0x0426 lv-LV
        SUBLANG_LITHUANIAN = 0x01, // Lithuanian
        SUBLANG_LOWER_SORBIAN_GERMANY = 0x02, // Lower Sorbian (Germany) =0x082e wee-DE
        SUBLANG_LUXEMBOURGISH_LUXEMBOURG = 0x01, // Luxembourgish (Luxembourg) =0x046e lb-LU
        SUBLANG_MACEDONIAN_MACEDONIA = 0x01, // Macedonian (Macedonia (FYROM)) =0x042f mk-MK
        SUBLANG_MALAY_MALAYSIA = 0x01, // Malay (Malaysia)
        SUBLANG_MALAY_BRUNEI_DARUSSALAM = 0x02, // Malay (Brunei Darussalam)
        SUBLANG_MALAYALAM_INDIA = 0x01, // Malayalam (India (Malayalam Script) ) =0x044c ml-IN
        SUBLANG_MALTESE_MALTA = 0x01, // Maltese (Malta) =0x043a mt-MT
        SUBLANG_MAORI_NEW_ZEALAND = 0x01, // Maori (New Zealand) =0x0481 mi-NZ
        SUBLANG_MAPUDUNGUN_CHILE = 0x01, // Mapudungun (Chile) =0x047a arn-CL
        SUBLANG_MARATHI_INDIA = 0x01, // Marathi (India) =0x044e mr-IN
        SUBLANG_MOHAWK_MOHAWK = 0x01, // Mohawk (Mohawk) =0x047c moh-CA
        SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA = 0x01, // Mongolian (Cyrillic, Mongolia)
        SUBLANG_MONGOLIAN_PRC = 0x02, // Mongolian (PRC)
        SUBLANG_NEPALI_INDIA = 0x02, // Nepali (India)
        SUBLANG_NEPALI_NEPAL = 0x01, // Nepali (Nepal) =0x0461 ne-NP
        SUBLANG_NORWEGIAN_BOKMAL = 0x01, // Norwegian (Bokmal)
        SUBLANG_NORWEGIAN_NYNORSK = 0x02, // Norwegian (Nynorsk)
        SUBLANG_OCCITAN_FRANCE = 0x01, // Occitan (France) =0x0482 oc-FR
        SUBLANG_ORIYA_INDIA = 0x01, // Oriya (India (Oriya Script)) =0x0448 or-IN
        SUBLANG_PASHTO_AFGHANISTAN = 0x01, // Pashto (Afghanistan)
        SUBLANG_PERSIAN_IRAN = 0x01, // Persian (Iran) =0x0429 fa-IR
        SUBLANG_POLISH_POLAND = 0x01, // Polish (Poland) =0x0415
        SUBLANG_PORTUGUESE = 0x02, // Portuguese
        SUBLANG_PORTUGUESE_BRAZILIAN = 0x01, // Portuguese (Brazilian)
        SUBLANG_PUNJABI_INDIA = 0x01, // Punjabi (India (Gurmukhi Script)) =0x0446 pa-IN
        SUBLANG_QUECHUA_BOLIVIA = 0x01, // Quechua (Bolivia)
        SUBLANG_QUECHUA_ECUADOR = 0x02, // Quechua (Ecuador)
        SUBLANG_QUECHUA_PERU = 0x03, // Quechua (Peru)
        SUBLANG_ROMANIAN_ROMANIA = 0x01, // Romanian (Romania) =0x0418
        SUBLANG_ROMANSH_SWITZERLAND = 0x01, // Romansh (Switzerland) =0x0417 rm-CH
        SUBLANG_RUSSIAN_RUSSIA = 0x01, // Russian (Russia) =0x0419
        SUBLANG_SAMI_NORTHERN_NORWAY = 0x01, // Northern Sami (Norway)
        SUBLANG_SAMI_NORTHERN_SWEDEN = 0x02, // Northern Sami (Sweden)
        SUBLANG_SAMI_NORTHERN_FINLAND = 0x03, // Northern Sami (Finland)
        SUBLANG_SAMI_LULE_NORWAY = 0x04, // Lule Sami (Norway)
        SUBLANG_SAMI_LULE_SWEDEN = 0x05, // Lule Sami (Sweden)
        SUBLANG_SAMI_SOUTHERN_NORWAY = 0x06, // Southern Sami (Norway)
        SUBLANG_SAMI_SOUTHERN_SWEDEN = 0x07, // Southern Sami (Sweden)
        SUBLANG_SAMI_SKOLT_FINLAND = 0x08, // Skolt Sami (Finland)
        SUBLANG_SAMI_INARI_FINLAND = 0x09, // Inari Sami (Finland)
        SUBLANG_SANSKRIT_INDIA = 0x01, // Sanskrit (India) =0x044f sa-IN
        SUBLANG_SCOTTISH_GAELIC = 0x01, // Scottish Gaelic (United Kingdom) =0x0491 gd-GB
        SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN = 0x06, // Serbian (Bosnia and Herzegovina - Latin)
        SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x07, // Serbian (Bosnia and Herzegovina - Cyrillic)
        SUBLANG_SERBIAN_MONTENEGRO_LATIN = 0x0b, // Serbian (Montenegro - Latn)
        SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC = 0x0c, // Serbian (Montenegro - Cyrillic)
        SUBLANG_SERBIAN_SERBIA_LATIN = 0x09, // Serbian (Serbia - Latin)
        SUBLANG_SERBIAN_SERBIA_CYRILLIC = 0x0a, // Serbian (Serbia - Cyrillic)
        SUBLANG_SERBIAN_CROATIA = 0x01, // Croatian (Croatia) =0x041a hr-HR
        SUBLANG_SERBIAN_LATIN = 0x02, // Serbian (Latin)
        SUBLANG_SERBIAN_CYRILLIC = 0x03, // Serbian (Cyrillic)
        SUBLANG_SINDHI_INDIA = 0x01, // Sindhi (India) reserved =0x0459
        SUBLANG_SINDHI_PAKISTAN = 0x02, // Sindhi (Pakistan) reserved =0x0859
        SUBLANG_SINDHI_AFGHANISTAN = 0x02, // For app compatibility only
        SUBLANG_SINHALESE_SRI_LANKA = 0x01, // Sinhalese (Sri Lanka)
        SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA = 0x01, // Northern Sotho (South Africa)
        SUBLANG_SLOVAK_SLOVAKIA = 0x01, // Slovak (Slovakia) =0x041b sk-SK
        SUBLANG_SLOVENIAN_SLOVENIA = 0x01, // Slovenian (Slovenia) =0x0424 sl-SI
        SUBLANG_SPANISH = 0x01, // Spanish (Castilian)
        SUBLANG_SPANISH_MEXICAN = 0x02, // Spanish (Mexican)
        SUBLANG_SPANISH_MODERN = 0x03, // Spanish (Modern)
        SUBLANG_SPANISH_GUATEMALA = 0x04, // Spanish (Guatemala)
        SUBLANG_SPANISH_COSTA_RICA = 0x05, // Spanish (Costa Rica)
        SUBLANG_SPANISH_PANAMA = 0x06, // Spanish (Panama)
        SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 0x07, // Spanish (Dominican Republic)
        SUBLANG_SPANISH_VENEZUELA = 0x08, // Spanish (Venezuela)
        SUBLANG_SPANISH_COLOMBIA = 0x09, // Spanish (Colombia)
        SUBLANG_SPANISH_PERU = 0x0a, // Spanish (Peru)
        SUBLANG_SPANISH_ARGENTINA = 0x0b, // Spanish (Argentina)
        SUBLANG_SPANISH_ECUADOR = 0x0c, // Spanish (Ecuador)
        SUBLANG_SPANISH_CHILE = 0x0d, // Spanish (Chile)
        SUBLANG_SPANISH_URUGUAY = 0x0e, // Spanish (Uruguay)
        SUBLANG_SPANISH_PARAGUAY = 0x0f, // Spanish (Paraguay)
        SUBLANG_SPANISH_BOLIVIA = 0x10, // Spanish (Bolivia)
        SUBLANG_SPANISH_EL_SALVADOR = 0x11, // Spanish (El Salvador)
        SUBLANG_SPANISH_HONDURAS = 0x12, // Spanish (Honduras)
        SUBLANG_SPANISH_NICARAGUA = 0x13, // Spanish (Nicaragua)
        SUBLANG_SPANISH_PUERTO_RICO = 0x14, // Spanish (Puerto Rico)
        SUBLANG_SPANISH_US = 0x15, // Spanish (United States)
        SUBLANG_SWAHILI_KENYA = 0x01, // Swahili (Kenya) =0x0441 sw-KE
        SUBLANG_SWEDISH = 0x01, // Swedish
        SUBLANG_SWEDISH_FINLAND = 0x02, // Swedish (Finland)
        SUBLANG_SYRIAC_SYRIA = 0x01, // Syriac (Syria) =0x045a syr-SY
        SUBLANG_TAJIK_TAJIKISTAN = 0x01, // Tajik (Tajikistan) =0x0428 tg-TJ-Cyrl
        SUBLANG_TAMAZIGHT_ALGERIA_LATIN = 0x02, // Tamazight (Latin, Algeria) =0x085f tmz-DZ-Latn
        SUBLANG_TAMIL_INDIA = 0x01, // Tamil (India)
        SUBLANG_TATAR_RUSSIA = 0x01, // Tatar (Russia) =0x0444 tt-RU
        SUBLANG_TELUGU_INDIA = 0x01, // Telugu (India (Telugu Script)) =0x044a te-IN
        SUBLANG_THAI_THAILAND = 0x01, // Thai (Thailand) =0x041e th-TH
        SUBLANG_TIBETAN_PRC = 0x01, // Tibetan (PRC)
        SUBLANG_TIGRIGNA_ERITREA = 0x02, // Tigrigna (Eritrea)
        SUBLANG_TSWANA_SOUTH_AFRICA = 0x01, // Setswana / Tswana (South Africa) =0x0432 tn-ZA
        SUBLANG_TURKISH_TURKEY = 0x01, // Turkish (Turkey) =0x041f tr-TR
        SUBLANG_TURKMEN_TURKMENISTAN = 0x01, // Turkmen (Turkmenistan) =0x0442 tk-TM
        SUBLANG_UIGHUR_PRC = 0x01, // Uighur (PRC) =0x0480 ug-CN
        SUBLANG_UKRAINIAN_UKRAINE = 0x01, // Ukrainian (Ukraine) =0x0422 uk-UA
        SUBLANG_UPPER_SORBIAN_GERMANY = 0x01, // Upper Sorbian (Germany) =0x042e wen-DE
        SUBLANG_URDU_PAKISTAN = 0x01, // Urdu (Pakistan)
        SUBLANG_URDU_INDIA = 0x02, // Urdu (India)
        SUBLANG_UZBEK_LATIN = 0x01, // Uzbek (Latin)
        SUBLANG_UZBEK_CYRILLIC = 0x02, // Uzbek (Cyrillic)
        SUBLANG_VIETNAMESE_VIETNAM = 0x01, // Vietnamese (Vietnam) =0x042a vi-VN
        SUBLANG_WELSH_UNITED_KINGDOM = 0x01, // Welsh (United Kingdom) =0x0452 cy-GB
        SUBLANG_WOLOF_SENEGAL = 0x01, // Wolof (Senegal)
        SUBLANG_XHOSA_SOUTH_AFRICA = 0x01, // isiXhosa / Xhosa (South Africa) =0x0434 xh-ZA
        SUBLANG_YAKUT_RUSSIA = 0x01, // Yakut (Russia) =0x0485 sah-RU
        SUBLANG_YI_PRC = 0x01, // Yi (PRC)) =0x0478
        SUBLANG_YORUBA_NIGERIA = 0x01, // Yoruba (Nigeria) 046a yo-NG
        SUBLANG_ZULU_SOUTH_AFRICA = 0x01, // isiZulu / Zulu (South Africa) =0x0435 zu-ZA
    }

    [Flags]
    public enum TASKDIALOG_COMMON_BUTTON_FLAGS : int
    {
        TDCBF_OK_BUTTON = 0x0001,
        TDCBF_YES_BUTTON = 0x0002,
        TDCBF_NO_BUTTON = 0x0004,
        TDCBF_CANCEL_BUTTON = 0x0008,
        TDCBF_RETRY_BUTTON = 0x0010,
        TDCBF_CLOSE_BUTTON = 0x0020,
    }

    [Flags]
    public enum ThreadAccessRights : uint
    {
        THREAD_TERMINATE = (0x0001),
        THREAD_SUSPEND_RESUME = (0x0002),
        THREAD_GET_CONTEXT = (0x0008),
        THREAD_SET_CONTEXT = (0x0010),
        THREAD_QUERY_INFORMATION = (0x0040),
        THREAD_SET_INFORMATION = (0x0020),
        THREAD_SET_THREAD_TOKEN = (0x0080),
        THREAD_IMPERSONATE = (0x0100),
        THREAD_DIRECT_IMPERSONATION = (0x0200),
        THREAD_SET_LIMITED_INFORMATION = (0x0400),
        THREAD_QUERY_LIMITED_INFORMATION = (0x0800),
        THREAD_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    [Flags]
    public enum TokenAccessRights : uint
    {
        TOKEN_ASSIGN_PRIMARY = (0x0001),
        TOKEN_DUPLICATE = (0x0002),
        TOKEN_IMPERSONATE = (0x0004),
        TOKEN_QUERY = (0x0008),
        TOKEN_QUERY_SOURCE = (0x0010),
        TOKEN_ADJUST_PRIVILEGES = (0x0020),
        TOKEN_ADJUST_GROUPS = (0x0040),
        TOKEN_ADJUST_DEFAULT = (0x0080),
        TOKEN_ADJUST_SESSIONID = (0x0100),

        TOKEN_ALL_ACCESS_P =
            (STANDARD_RIGHTS_REQUIRED |
            TOKEN_ASSIGN_PRIMARY |
            TOKEN_DUPLICATE |
            TOKEN_IMPERSONATE |
            TOKEN_QUERY |
            TOKEN_QUERY_SOURCE |
            TOKEN_ADJUST_PRIVILEGES |
            TOKEN_ADJUST_GROUPS |
            TOKEN_ADJUST_DEFAULT),
        TOKEN_ALL_ACCESS = (TOKEN_ALL_ACCESS_P | TOKEN_ADJUST_SESSIONID),
        TOKEN_READ = (STANDARD_RIGHTS_READ | TOKEN_QUERY),
        TOKEN_WRITE =
            (STANDARD_RIGHTS_WRITE |
            TOKEN_ADJUST_PRIVILEGES |
            TOKEN_ADJUST_GROUPS |
            TOKEN_ADJUST_DEFAULT),
        TOKEN_EXECUTE = (STANDARD_RIGHTS_EXECUTE),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    public enum TOKEN_TYPE : int
    {
        TokenPrimary = 1,
        TokenImpersonation = 2,
    }

    [Flags]
    public enum TouchEventFlags : uint
    {
        TOUCHEVENTF_MOVE = 0x0001,
        TOUCHEVENTF_DOWN = 0x0002,
        TOUCHEVENTF_UP = 0x0004,
        TOUCHEVENTF_INRANGE = 0x0008,
        TOUCHEVENTF_PRIMARY = 0x0010,
        TOUCHEVENTF_NOCOALESCE = 0x0020,
        TOUCHEVENTF_PEN = 0x0040,
        TOUCHEVENTF_PALM = 0x0080,
    }

    [Flags]
    public enum TouchInputMask : uint
    {
        TOUCHINPUTMASKF_TIMEFROMSYSTEM = 0x0001,
        TOUCHINPUTMASKF_EXTRAINFO = 0x0002,
        TOUCHINPUTMASKF_CONTACTAREA = 0x0004,
    }

    [Flags]
    public enum TouchWindowFlags : uint
    {
        TWF_FINETOUCH = 0x00000001,
        TWF_WANTPALM = 0x00000002,
    }

    [Flags]
    public enum TransactionAccessRights : uint
    {
        TRANSACTION_QUERY_INFORMATION = 0x0001,
        TRANSACTION_SET_INFORMATION = 0x0002,
        TRANSACTION_ENLIST = 0x0004,
        TRANSACTION_COMMIT = 0x0008,
        TRANSACTION_ROLLBACK = 0x0010,
        TRANSACTION_PROPAGATE = 0x0020,
        TRANSACTION_RIGHT_RESERVED1 = 0x0040,

        // Generic mappings for transaction rights.
        // Resource managers, when enlisting, should generally use the macro
        // TRANSACTION_RESOURCE_MANAGER_RIGHTS when opening a transaction.
        // It's the same as generic read and write except that it does not allow
        // a commit decision to be made.

        TRANSACTION_GENERIC_READ =
            (STANDARD_RIGHTS_READ |
            TRANSACTION_QUERY_INFORMATION |
            SYNCHRONIZE),

        TRANSACTION_GENERIC_WRITE =
            (STANDARD_RIGHTS_WRITE |
            TRANSACTION_SET_INFORMATION |
            TRANSACTION_COMMIT |
            TRANSACTION_ENLIST |
            TRANSACTION_ROLLBACK |
            TRANSACTION_PROPAGATE |
            SYNCHRONIZE),

        TRANSACTION_GENERIC_EXECUTE =
            (STANDARD_RIGHTS_EXECUTE |
            TRANSACTION_COMMIT |
            TRANSACTION_ROLLBACK |
            SYNCHRONIZE),

        TRANSACTION_ALL_ACCESS =
            (STANDARD_RIGHTS_REQUIRED |
            TRANSACTION_GENERIC_READ |
            TRANSACTION_GENERIC_WRITE |
            TRANSACTION_GENERIC_EXECUTE),

        TRANSACTION_RESOURCE_MANAGER_RIGHTS =
            (TRANSACTION_GENERIC_READ |
            STANDARD_RIGHTS_WRITE |
            TRANSACTION_SET_INFORMATION |
            TRANSACTION_ENLIST |
            TRANSACTION_ROLLBACK |
            TRANSACTION_PROPAGATE |
            SYNCHRONIZE),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    [Flags]
    public enum TransactionManagerAccessRights : uint
    {
        TRANSACTIONMANAGER_QUERY_INFORMATION = 0x0001,
        TRANSACTIONMANAGER_SET_INFORMATION = 0x0002,
        TRANSACTIONMANAGER_RECOVER = 0x0004,
        TRANSACTIONMANAGER_RENAME = 0x0008,
        TRANSACTIONMANAGER_CREATE_RM = 0x0010,

        ///<summary> The following right is intended for DTC's use only; it will be deprecated, and no one else should take a dependency on it.</summary>
        [Obsolete]
        TRANSACTIONMANAGER_BIND_TRANSACTION = 0x0020,

        TRANSACTIONMANAGER_GENERIC_READ = 
            (STANDARD_RIGHTS_READ |
            TRANSACTIONMANAGER_QUERY_INFORMATION),

        TRANSACTIONMANAGER_GENERIC_WRITE = 
            (STANDARD_RIGHTS_WRITE |
            TRANSACTIONMANAGER_SET_INFORMATION |
            TRANSACTIONMANAGER_RECOVER |
            TRANSACTIONMANAGER_RENAME |
            TRANSACTIONMANAGER_CREATE_RM),

        TRANSACTIONMANAGER_GENERIC_EXECUTE =
            (STANDARD_RIGHTS_EXECUTE),

        TRANSACTIONMANAGER_ALL_ACCESS =
            (STANDARD_RIGHTS_REQUIRED |
            TRANSACTIONMANAGER_GENERIC_READ |
            TRANSACTIONMANAGER_GENERIC_WRITE |
            TRANSACTIONMANAGER_GENERIC_EXECUTE |
            TRANSACTIONMANAGER_BIND_TRANSACTION),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    /// <summary>
    /// "evntrace.h" also defines this as TRACE_INFO_CLASS in the same typedef statement.
    /// The two are synonymous at this time.
    /// </summary>
    public enum TRACE_QUERY_INFO_CLASS : int
    {
        TraceGuidQueryList = 0,
        TraceGuidQueryInfo = 1,
        TraceGuidQueryProcess = 2,
        TraceStackTracingInfo = 3,
        MaxTraceSetInfoClass = 4,
    }

    public enum TraceControlCode : uint
    {
        EVENT_TRACE_CONTROL_QUERY = 0,
        EVENT_TRACE_CONTROL_STOP = 1,
        EVENT_TRACE_CONTROL_UPDATE = 2,
        EVENT_TRACE_CONTROL_FLUSH = 3,
    }

    public enum TraceLevel : byte
    {
        TRACE_LEVEL_NONE = 0, // Tracing is not on
        TRACE_LEVEL_CRITICAL = 1, // Abnormal exit or termination
        TRACE_LEVEL_ERROR = 2, // Severe errors that need logging
        TRACE_LEVEL_WARNING = 3, // Warnings such as allocation failure
        TRACE_LEVEL_INFORMATION = 4, // Includes non-error cases(e.g.,Entry-Exit)
        TRACE_LEVEL_VERBOSE = 5, // Detailed traces from intermediate steps
    }

    public enum TraceMessageFlags : uint
    {
        TRACE_MESSAGE_SEQUENCE = 1, // Message should include a sequence number
        TRACE_MESSAGE_GUID = 2, // Message includes a GUID
        TRACE_MESSAGE_COMPONENTID = 4, // Message has no GUID, Component ID instead
        TRACE_MESSAGE_TIMESTAMP = 8, // Message includes a timestamp
        TRACE_MESSAGE_PERFORMANCE_TIMESTAMP = 16, // *Obsolete* Clock type is controlled by the logger
        TRACE_MESSAGE_SYSTEMINFO = 32, // Message includes system information TID,PID
        TRACE_MESSAGE_POINTER32 = 0x0040, // Message logged by 32 bit provider
        TRACE_MESSAGE_POINTER64 = 0x0080, // Message logged by 64 bit provider
        TRACE_MESSAGE_FLAG_MASK = 0xFFFF, // Only the lower 16 bits of flags are placed in the message, those above 16 bits are reserved for local processing
        TRACE_MESSAGE_MAXIMUM_SIZE = 8 * 1024, // the maximum size allowed for a single trace message, longer messages will return ERROR_BUFFER_OVERFLOW
    }

    public enum TraceProviderFlags : uint
    {
        TRACE_PROVIDER_FLAG_LEGACY = 0x00000001,
        TRACE_PROVIDER_FLAG_PRE_ENABLE = 0x00000002,
    }

    public enum TraceType : byte
    {
        EVENT_TRACE_TYPE_INFO = 0x00, // Info or point event
        EVENT_TRACE_TYPE_START = 0x01, // Start event
        EVENT_TRACE_TYPE_END = 0x02, // End event
        EVENT_TRACE_TYPE_STOP = 0x02, // Stop event (WinEvent compatible)
        EVENT_TRACE_TYPE_DC_START = 0x03, // Collection start marker
        EVENT_TRACE_TYPE_DC_END = 0x04, // Collection end marker
        EVENT_TRACE_TYPE_EXTENSION = 0x05, // Extension/continuation
        EVENT_TRACE_TYPE_REPLY = 0x06, // Reply event
        EVENT_TRACE_TYPE_DEQUEUE = 0x07, // De-queue event
        EVENT_TRACE_TYPE_RESUME = 0x07, // Resume event (WinEvent compatible)
        EVENT_TRACE_TYPE_CHECKPOINT = 0x08, // Generic checkpoint event
        EVENT_TRACE_TYPE_SUSPEND = 0x08, // Suspend event (WinEvent compatible)
        EVENT_TRACE_TYPE_WINEVT_SEND = 0x09, // Send Event (WinEvent compatible)
        EVENT_TRACE_TYPE_WINEVT_RECEIVE = 0xF0, // Receive Event (WinEvent compatible)
    }

    public enum TRANSACTION_OUTCOME : int
    {
        TransactionOutcomeUndetermined = 0,
        TransactionOutcomeCommitted = 1,
        TransactionOutcomeAborted = 2,
    }

    [Flags]
    public enum TRANSFER_SOURCE_FLAGS : uint
    {
        TSF_NORMAL = 0,
        TSF_FAIL_EXIST = 0,
        TSF_RENAME_EXIST = 0x1,
        TSF_OVERWRITE_EXIST = 0x2,
        TSF_ALLOW_DECRYPTION = 0x4,
        TSF_NO_SECURITY = 0x8,
        TSF_COPY_CREATION_TIME = 0x10,
        TSF_COPY_WRITE_TIME = 0x20,
        TSF_USE_FULL_ACCESS = 0x40,
        TSF_DELETE_RECYCLE_IF_POSSIBLE = 0x80,
        TSF_COPY_HARD_LINK = 0x100,
        TSF_COPY_LOCALIZED_NAME = 0x200,
        TSF_MOVE_AS_COPY_DELETE = 0x400,
        TSF_SUSPEND_SHELLEVENTS = 0x800,
    }

    public enum TYMED : uint
    {
        TYMED_HGLOBAL = 1,
        TYMED_FILE = 2,
        TYMED_ISTREAM = 4,
        TYMED_ISTORAGE = 8,
        TYMED_GDI = 16,
        TYMED_MFPICT = 32,
        TYMED_ENHMF = 64,
        TYMED_NULL = 0,
    }

    /// <summary>
    /// The following public Uri_CREATE flags may be passed in 
    /// through the dwFlags parameter of the CreateUri functions.
    /// Note that ALLOW_RELATIVE and ALLOW_IMPLICIT_WILDCARD_SCHEME are mutually exclusive and may not be passed together.
    /// </summary>
    public enum Uri_CREATE : uint
    {
        ///<summary>When the scheme is unspecified and not implicit file, assume relative.</summary>
        Uri_CREATE_ALLOW_RELATIVE = 0x00000001,
        ///<summary>When the scheme is unspecified and not implicit file, assume wildcard.</summary>
        Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME = 0x00000002,
        ///<summary>When the scheme is unspecified and it starts with X: or \\ assume its a file scheme.</summary>
        Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME = 0x00000004,
        ///<summary>If there's a query string don't look for a fragment</summary>
        Uri_CREATE_NOFRAG = 0x00000008,
        ///<summary>Do not canonicalize the scheme, host, authority, or path</summary>
        Uri_CREATE_NO_CANONICALIZE = 0x00000010,
        ///<summary>DEFAULT: Canonicalize the scheme, host, authority, and path</summary>
        Uri_CREATE_CANONICALIZE = 0x00000100,
        ///<summary>Use DOS path compat mode for file URI creation</summary>
        Uri_CREATE_FILE_USE_DOS_PATH = 0x00000020,
        ///<summary>Beta2 DEFAULT: Decode the contents of query and fragment, then re-encode reserved characters</summary>
        Uri_CREATE_DECODE_EXTRA_INFO = 0x00000040,
        ///<summary>Beta1 DEFAULT: Neither decode nor re-encode any part of the query or fragment</summary>
        Uri_CREATE_NO_DECODE_EXTRA_INFO = 0x00000080,
        ///<summary>Beta2 DEFAULT: Heirarchical URIs with present and unknown schemes will be treated like heirarchical URIs</summary>
        Uri_CREATE_CRACK_UNKNOWN_SCHEMES = 0x00000200,
        ///<summary>Beta1 DEFAULT: Heirarchical URIs with present and unknown schemes will be treated like opaque URIs</summary>
        Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES = 0x00000400,
        ///<summary>DEFAULT:  Perform pre-processing on the URI to remove control characters and whitespace as if the URI comes from the raw href value of an HTML page.</summary>
        Uri_CREATE_PRE_PROCESS_HTML_URI = 0x00000800,
        ///<summary>Don't perform pre-processing to remove control characters and whitespace as appropriate.</summary>
        Uri_CREATE_NO_PRE_PROCESS_HTML_URI = 0x00001000,
        ///<summary>Use IE registry settings for such things as whether or not to use IDN.</summary>
        Uri_CREATE_IE_SETTINGS = 0x00002000,
        ///<summary>DEFAULT: Don't use IE registry settings.</summary>
        Uri_CREATE_NO_IE_SETTINGS = 0x00004000,
        ///<summary>Don't percent-encode characters that are forbidden by the RFC.</summary>
        Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS = 0x00008000,
    }

    public enum Uri_PROPERTY : int
    {
        Uri_PROPERTY_ABSOLUTE_URI = 0,
        Uri_PROPERTY_STRING_START = Uri_PROPERTY_ABSOLUTE_URI,
        Uri_PROPERTY_AUTHORITY = 1,
        Uri_PROPERTY_DISPLAY_URI = 2,
        Uri_PROPERTY_DOMAIN = 3,
        Uri_PROPERTY_EXTENSION = 4,
        Uri_PROPERTY_FRAGMENT = 5,
        Uri_PROPERTY_HOST = 6,
        Uri_PROPERTY_PASSWORD = 7,
        Uri_PROPERTY_PATH = 8,
        Uri_PROPERTY_PATH_AND_QUERY = 9,
        Uri_PROPERTY_QUERY = 10,
        Uri_PROPERTY_RAW_URI = 11,
        Uri_PROPERTY_SCHEME_NAME = 12,
        Uri_PROPERTY_USER_INFO = 13,
        Uri_PROPERTY_USER_NAME = 14,
        Uri_PROPERTY_STRING_LAST = Uri_PROPERTY_USER_NAME,
        Uri_PROPERTY_HOST_TYPE = 15,
        Uri_PROPERTY_DWORD_START = Uri_PROPERTY_HOST_TYPE,
        Uri_PROPERTY_PORT = 16,
        Uri_PROPERTY_SCHEME = 17,
        Uri_PROPERTY_ZONE = 18,
        Uri_PROPERTY_DWORD_LAST = Uri_PROPERTY_ZONE,
    }

    [Flags]
    public enum UrlEscapeFlags : uint
    {
        URL_UNESCAPE = 0x10000000,
        URL_ESCAPE_UNSAFE = 0x20000000,
        URL_PLUGGABLE_PROTOCOL = 0x40000000,
        URL_WININET_COMPATIBILITY = 0x80000000,
        URL_DONT_ESCAPE_EXTRA_INFO = 0x02000000,
        URL_DONT_UNESCAPE_EXTRA_INFO = URL_DONT_ESCAPE_EXTRA_INFO,
        URL_BROWSER_MODE = URL_DONT_ESCAPE_EXTRA_INFO,
        URL_ESCAPE_SPACES_ONLY = 0x04000000,
        URL_DONT_SIMPLIFY = 0x08000000,
        URL_NO_META = URL_DONT_SIMPLIFY,
        URL_UNESCAPE_INPLACE = 0x00100000,
        URL_CONVERT_IF_DOSPATH = 0x00200000,
        URL_UNESCAPE_HIGH_ANSI_ONLY = 0x00400000,
        URL_INTERNAL_PATH = 0x00800000,  // Will escape #'s in paths
        URL_FILE_USE_PATHURL = 0x00010000,
        URL_DONT_UNESCAPE = 0x00020000,  // Do not unescape the path/url at all
        URL_ESCAPE_AS_UTF8 = 0x00040000,  // Percent-encode all non-ASCII characters as their UTF-8 equivalents.
        URL_ESCAPE_PERCENT = 0x00001000,
        URL_ESCAPE_SEGMENT_ONLY = 0x00002000,  // Treat the entire URL param as one URL segment.
    }

    public enum URLIS : int
    {
        URLIS_URL = 0,
        URLIS_OPAQUE = 1,
        URLIS_NOHISTORY = 2,
        URLIS_FILEURL = 3,
        URLIS_APPLIABLE = 4,
        URLIS_DIRECTORY = 5,
        URLIS_HASQUERY = 6,
    }

    public enum VARIANT_BOOL : short
    {
        TRUE = -1,
        FALSE = 0,
    }

    public enum VARTYPE : ushort
    {
        VT_EMPTY = 0,
        VT_NULL = 1,
        VT_I2 = 2,
        VT_I4 = 3,
        VT_R4 = 4,
        VT_R8 = 5,
        VT_CY = 6,
        VT_DATE = 7,
        VT_BSTR = 8,
        VT_DISPATCH = 9,
        VT_ERROR = 10,
        VT_BOOL = 11,
        VT_VARIANT = 12,
        VT_UNKNOWN = 13,
        VT_UI1 = 17,
        VT_RESERVED = 0x8000,
        VT_BYREF = 0x4000,
        VT_ARRAY = 0x2000,
    }

    public enum VirtualKey : byte
    {
        /// <summary></summary>
        LeftButton = 0x01,
        /// <summary></summary>
        RightButton = 0x02,
        /// <summary></summary>
        Cancel = 0x03,
        /// <summary></summary>
        MiddleButton = 0x04,
        /// <summary></summary>
        ExtraButton1 = 0x05,
        /// <summary></summary>
        ExtraButton2 = 0x06,
        /// <summary></summary>
        Back = 0x08,
        /// <summary></summary>
        Tab = 0x09,
        /// <summary></summary>
        Clear = 0x0C,
        /// <summary></summary>
        Return = 0x0D,
        /// <summary></summary>
        Shift = 0x10,
        /// <summary></summary>
        Control = 0x11,
        /// <summary></summary>
        Menu = 0x12,
        /// <summary></summary>
        Pause = 0x13,
        /// <summary></summary>
        Kana = 0x15,
        /// <summary></summary>
        Hangeul = 0x15,
        /// <summary></summary>
        Hangul = 0x15,
        /// <summary></summary>
        Junja = 0x17,
        /// <summary></summary>
        Final = 0x18,
        /// <summary></summary>
        Hanja = 0x19,
        /// <summary></summary>
        Kanji = 0x19,
        /// <summary></summary>
        Escape = 0x1B,
        /// <summary></summary>
        Convert = 0x1C,
        /// <summary></summary>
        NonConvert = 0x1D,
        /// <summary></summary>
        Accept = 0x1E,
        /// <summary></summary>
        ModeChange = 0x1F,
        /// <summary></summary>
        Space = 0x20,
        /// <summary></summary>
        Prior = 0x21,
        /// <summary></summary>
        Next = 0x22,
        /// <summary></summary>
        End = 0x23,
        /// <summary></summary>
        Home = 0x24,
        /// <summary></summary>
        Left = 0x25,
        /// <summary></summary>
        Up = 0x26,
        /// <summary></summary>
        Right = 0x27,
        /// <summary></summary>
        Down = 0x28,
        /// <summary></summary>
        Select = 0x29,
        /// <summary></summary>
        Print = 0x2A,
        /// <summary></summary>
        Execute = 0x2B,
        /// <summary></summary>
        Snapshot = 0x2C,
        /// <summary></summary>
        Insert = 0x2D,
        /// <summary></summary>
        Delete = 0x2E,
        /// <summary></summary>
        Help = 0x2F,
        /// <summary></summary>
        N0 = 0x30,
        /// <summary></summary>
        N1 = 0x31,
        /// <summary></summary>
        N2 = 0x32,
        /// <summary></summary>
        N3 = 0x33,
        /// <summary></summary>
        N4 = 0x34,
        /// <summary></summary>
        N5 = 0x35,
        /// <summary></summary>
        N6 = 0x36,
        /// <summary></summary>
        N7 = 0x37,
        /// <summary></summary>
        N8 = 0x38,
        /// <summary></summary>
        N9 = 0x39,
        /// <summary></summary>
        A = 0x41,
        /// <summary></summary>
        B = 0x42,
        /// <summary></summary>
        C = 0x43,
        /// <summary></summary>
        D = 0x44,
        /// <summary></summary>
        E = 0x45,
        /// <summary></summary>
        F = 0x46,
        /// <summary></summary>
        G = 0x47,
        /// <summary></summary>
        H = 0x48,
        /// <summary></summary>
        I = 0x49,
        /// <summary></summary>
        J = 0x4A,
        /// <summary></summary>
        K = 0x4B,
        /// <summary></summary>
        L = 0x4C,
        /// <summary></summary>
        M = 0x4D,
        /// <summary></summary>
        N = 0x4E,
        /// <summary></summary>
        O = 0x4F,
        /// <summary></summary>
        P = 0x50,
        /// <summary></summary>
        Q = 0x51,
        /// <summary></summary>
        R = 0x52,
        /// <summary></summary>
        S = 0x53,
        /// <summary></summary>
        T = 0x54,
        /// <summary></summary>
        U = 0x55,
        /// <summary></summary>
        V = 0x56,
        /// <summary></summary>
        W = 0x57,
        /// <summary></summary>
        X = 0x58,
        /// <summary></summary>
        Y = 0x59,
        /// <summary></summary>
        Z = 0x5A,
        /// <summary></summary>
        LeftWindows = 0x5B,
        /// <summary></summary>
        RightWindows = 0x5C,
        /// <summary></summary>
        Application = 0x5D,
        /// <summary></summary>
        Sleep = 0x5F,
        /// <summary></summary>
        Numpad0 = 0x60,
        /// <summary></summary>
        Numpad1 = 0x61,
        /// <summary></summary>
        Numpad2 = 0x62,
        /// <summary></summary>
        Numpad3 = 0x63,
        /// <summary></summary>
        Numpad4 = 0x64,
        /// <summary></summary>
        Numpad5 = 0x65,
        /// <summary></summary>
        Numpad6 = 0x66,
        /// <summary></summary>
        Numpad7 = 0x67,
        /// <summary></summary>
        Numpad8 = 0x68,
        /// <summary></summary>
        Numpad9 = 0x69,
        /// <summary></summary>
        Multiply = 0x6A,
        /// <summary></summary>
        Add = 0x6B,
        /// <summary></summary>
        Separator = 0x6C,
        /// <summary></summary>
        Subtract = 0x6D,
        /// <summary></summary>
        Decimal = 0x6E,
        /// <summary></summary>
        Divide = 0x6F,
        /// <summary></summary>
        F1 = 0x70,
        /// <summary></summary>
        F2 = 0x71,
        /// <summary></summary>
        F3 = 0x72,
        /// <summary></summary>
        F4 = 0x73,
        /// <summary></summary>
        F5 = 0x74,
        /// <summary></summary>
        F6 = 0x75,
        /// <summary></summary>
        F7 = 0x76,
        /// <summary></summary>
        F8 = 0x77,
        /// <summary></summary>
        F9 = 0x78,
        /// <summary></summary>
        F10 = 0x79,
        /// <summary></summary>
        F11 = 0x7A,
        /// <summary></summary>
        F12 = 0x7B,
        /// <summary></summary>
        F13 = 0x7C,
        /// <summary></summary>
        F14 = 0x7D,
        /// <summary></summary>
        F15 = 0x7E,
        /// <summary></summary>
        F16 = 0x7F,
        /// <summary></summary>
        F17 = 0x80,
        /// <summary></summary>
        F18 = 0x81,
        /// <summary></summary>
        F19 = 0x82,
        /// <summary></summary>
        F20 = 0x83,
        /// <summary></summary>
        F21 = 0x84,
        /// <summary></summary>
        F22 = 0x85,
        /// <summary></summary>
        F23 = 0x86,
        /// <summary></summary>
        F24 = 0x87,
        /// <summary></summary>
        NumLock = 0x90,
        /// <summary></summary>
        ScrollLock = 0x91,
        /// <summary></summary>
        NEC_Equal = 0x92,
        /// <summary></summary>
        Fujitsu_Jisho = 0x92,
        /// <summary></summary>
        Fujitsu_Masshou = 0x93,
        /// <summary></summary>
        Fujitsu_Touroku = 0x94,
        /// <summary></summary>
        Fujitsu_Loya = 0x95,
        /// <summary></summary>
        Fujitsu_Roya = 0x96,
        /// <summary></summary>
        LeftShift = 0xA0,
        /// <summary></summary>
        RightShift = 0xA1,
        /// <summary></summary>
        LeftControl = 0xA2,
        /// <summary></summary>
        RightControl = 0xA3,
        /// <summary></summary>
        LeftMenu = 0xA4,
        /// <summary></summary>
        RightMenu = 0xA5,
        /// <summary></summary>
        BrowserBack = 0xA6,
        /// <summary></summary>
        BrowserForward = 0xA7,
        /// <summary></summary>
        BrowserRefresh = 0xA8,
        /// <summary></summary>
        BrowserStop = 0xA9,
        /// <summary></summary>
        BrowserSearch = 0xAA,
        /// <summary></summary>
        BrowserFavorites = 0xAB,
        /// <summary></summary>
        BrowserHome = 0xAC,
        /// <summary></summary>
        VolumeMute = 0xAD,
        /// <summary></summary>
        VolumeDown = 0xAE,
        /// <summary></summary>
        VolumeUp = 0xAF,
        /// <summary></summary>
        MediaNextTrack = 0xB0,
        /// <summary></summary>
        MediaPrevTrack = 0xB1,
        /// <summary></summary>
        MediaStop = 0xB2,
        /// <summary></summary>
        MediaPlayPause = 0xB3,
        /// <summary></summary>
        LaunchMail = 0xB4,
        /// <summary></summary>
        LaunchMediaSelect = 0xB5,
        /// <summary></summary>
        LaunchApplication1 = 0xB6,
        /// <summary></summary>
        LaunchApplication2 = 0xB7,
        /// <summary></summary>
        OEM1 = 0xBA,
        /// <summary></summary>
        OEMPlus = 0xBB,
        /// <summary></summary>
        OEMComma = 0xBC,
        /// <summary></summary>
        OEMMinus = 0xBD,
        /// <summary></summary>
        OEMPeriod = 0xBE,
        /// <summary></summary>
        OEM2 = 0xBF,
        /// <summary></summary>
        OEM3 = 0xC0,
        /// <summary></summary>
        OEM4 = 0xDB,
        /// <summary></summary>
        OEM5 = 0xDC,
        /// <summary></summary>
        OEM6 = 0xDD,
        /// <summary></summary>
        OEM7 = 0xDE,
        /// <summary></summary>
        OEM8 = 0xDF,
        /// <summary></summary>
        OEMAX = 0xE1,
        /// <summary></summary>
        OEM102 = 0xE2,
        /// <summary></summary>
        ICOHelp = 0xE3,
        /// <summary></summary>
        ICO00 = 0xE4,
        /// <summary></summary>
        ProcessKey = 0xE5,
        /// <summary></summary>
        ICOClear = 0xE6,
        /// <summary></summary>
        Packet = 0xE7,
        /// <summary></summary>
        OEMReset = 0xE9,
        /// <summary></summary>
        OEMJump = 0xEA,
        /// <summary></summary>
        OEMPA1 = 0xEB,
        /// <summary></summary>
        OEMPA2 = 0xEC,
        /// <summary></summary>
        OEMPA3 = 0xED,
        /// <summary></summary>
        OEMWSCtrl = 0xEE,
        /// <summary></summary>
        OEMCUSel = 0xEF,
        /// <summary></summary>
        OEMATTN = 0xF0,
        /// <summary></summary>
        OEMFinish = 0xF1,
        /// <summary></summary>
        OEMCopy = 0xF2,
        /// <summary></summary>
        OEMAuto = 0xF3,
        /// <summary></summary>
        OEMENLW = 0xF4,
        /// <summary></summary>
        OEMBackTab = 0xF5,
        /// <summary></summary>
        ATTN = 0xF6,
        /// <summary></summary>
        CRSel = 0xF7,
        /// <summary></summary>
        EXSel = 0xF8,
        /// <summary></summary>
        EREOF = 0xF9,
        /// <summary></summary>
        Play = 0xFA,
        /// <summary></summary>
        Zoom = 0xFB,
        /// <summary></summary>
        Noname = 0xFC,
        /// <summary></summary>
        PA1 = 0xFD,
        /// <summary></summary>
        OEMClear = 0xFE
    }

    [Flags]
    public enum WindowClassStyles : uint
    {
        CS_VREDRAW = 0x0001,
        CS_HREDRAW = 0x0002,
        CS_KEYCVTWINDOW = 0x0004,
        CS_DBLCLKS = 0x0008,
        CS_OWNDC = 0x0020,
        CS_CLASSDC = 0x0040,
        CS_PARENTDC = 0x0080,
        CS_NOKEYCVT = 0x0100,
        CS_NOCLOSE = 0x0200,
        CS_SAVEBITS = 0x0800,
        CS_BYTEALIGNCLIENT = 0x1000,
        CS_BYTEALIGNWINDOW = 0x2000,
        CS_GLOBALCLASS = 0x4000,
        CS_IME = 0x00010000,
    }

    public enum WindowLongOffset : int
    {
        GWL_WNDPROC = -4,
        GWL_HINSTANCE = -6,
        GWL_HWNDPARENT = -8,
        GWL_ID = -12,
        GWL_STYLE = -16,
        GWL_EXSTYLE = -20,
        GWL_USERDATA = -21,
    }

    public enum WindowLongPtrOffset : int
    {
        GWLP_WNDPROC = -4,
        GWLP_HINSTANCE = -6,
        GWLP_HWNDPARENT = -8,
        GWLP_ID = -12,
        GWLP_STYLE = -16,
        GWLP_EXSTYLE = -20,
        GWLP_USERDATA = -21,
    }

    [Flags]
    public enum WindowStationAccessRights : uint
    {
        WINSTA_ENUMDESKTOPS = 0x0001,
        WINSTA_READATTRIBUTES = 0x0002,
        WINSTA_ACCESSCLIPBOARD = 0x0004,
        WINSTA_CREATEDESKTOP = 0x0008,
        WINSTA_WRITEATTRIBUTES = 0x0010,
        WINSTA_ACCESSGLOBALATOMS = 0x0020,
        WINSTA_EXITWINDOWS = 0x0040,
        WINSTA_ENUMERATE = 0x0100,
        WINSTA_READSCREEN = 0x0200,

        WINSTA_ALL_ACCESS =
            (WINSTA_ENUMDESKTOPS |
            WINSTA_READATTRIBUTES |
            WINSTA_ACCESSCLIPBOARD |
            WINSTA_CREATEDESKTOP |
            WINSTA_WRITEATTRIBUTES |
            WINSTA_ACCESSGLOBALATOMS |
            WINSTA_EXITWINDOWS |
            WINSTA_ENUMERATE |
            WINSTA_READSCREEN),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    [Flags]
    public enum WindowStyles : uint
    {
        Class_0x0001 = 0x0001,
        Class_0x0002 = 0x0002,
        Class_0x0004 = 0x0004,
        Class_0x0008 = 0x0008,
        Class_0x0010 = 0x0010,
        Class_0x0020 = 0x0020,
        Class_0x0040 = 0x0040,
        Class_0x0080 = 0x0080,
        Class_0x0100 = 0x0100,
        Class_0x0200 = 0x0200,
        Class_0x0400 = 0x0400,
        Class_0x0800 = 0x0800,
        Class_0x1000 = 0x1000,
        Class_0x2000 = 0x2000,
        Class_0x4000 = 0x4000,
        Class_0x8000 = 0x8000,

        /// <summary>The window has a thin-line border.</summary>
        WS_BORDER = 0x800000,

        /// <summary>The window has a title bar (includes the WS_BORDER style).</summary>
        WS_CAPTION = 0xc00000,

        /// <summary>The window is a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style.</summary>
        WS_CHILD = 0x40000000,

        /// <summary>Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.</summary>
        WS_CLIPCHILDREN = 0x2000000,

        /// <summary>
        /// Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated.
        /// If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.
        /// </summary>
        WS_CLIPSIBLINGS = 0x4000000,

        /// <summary>The window is initially disabled. A disabled window cannot receive input from the user. To change this after a window has been created, use the EnableWindow function.</summary>
        WS_DISABLED = 0x8000000,

        /// <summary>The window has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.</summary>
        WS_DLGFRAME = 0x400000,

        /// <summary>
        /// The window is the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style.
        /// The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.
        /// You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use the SetWindowLong function.
        /// </summary>
        WS_GROUP = 0x20000,

        /// <summary>The window has a horizontal scroll bar.</summary>
        WS_HSCROLL = 0x100000,

        /// <summary>The window is initially maximized.</summary> 
        WS_MAXIMIZE = 0x1000000,

        /// <summary>The window has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.</summary> 
        WS_MAXIMIZEBOX = 0x10000,

        /// <summary>The window is initially minimized.</summary>
        WS_MINIMIZE = 0x20000000,

        /// <summary>The window has a minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.</summary>
        WS_MINIMIZEBOX = 0x20000,

        /// <summary>The window is an overlapped window. An overlapped window has a title bar and a border.</summary>
        WS_OVERLAPPED = 0x0,

        /// <summary>The window is an overlapped window.</summary>
        WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_SIZEFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,

        /// <summary>The window is a pop-up window. This style cannot be used with the WS_CHILD style.</summary>
        WS_POPUP = 0x80000000u,

        /// <summary>The window is a pop-up window. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible.</summary>
        WS_POPUPWINDOW = WS_POPUP | WS_BORDER | WS_SYSMENU,

        /// <summary>The window has a sizing border.</summary>
        WS_SIZEFRAME = 0x40000,

        /// <summary>The window has a window menu on its title bar. The WS_CAPTION style must also be specified.</summary>
        WS_SYSMENU = 0x80000,

        /// <summary>
        /// The window is a control that can receive the keyboard focus when the user presses the TAB key.
        /// Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.  
        /// You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use the SetWindowLong function.
        /// For user-created windows and modeless dialogs to work with tab stops, alter the message loop to call the IsDialogMessage function.
        /// </summary>
        WS_TABSTOP = 0x10000,

        /// <summary>The window is initially visible. This style can be turned on and off by using the ShowWindow or SetWindowPos function.</summary>
        WS_VISIBLE = 0x10000000,

        /// <summary>The window has a vertical scroll bar.</summary>
        WS_VSCROLL = 0x200000,
    }

    public enum WinEventCode : uint
    {
        EVENT_SYSTEM_SOUND = 0x0001,
        EVENT_SYSTEM_ALERT = 0x0002,
        EVENT_SYSTEM_FOREGROUND = 0x0003,
        EVENT_SYSTEM_MENUSTART = 0x0004,
        EVENT_SYSTEM_MENUEND = 0x0005,
        EVENT_SYSTEM_MENUPOPUPSTART = 0x0006,
        EVENT_SYSTEM_MENUPOPUPEND = 0x0007,
        EVENT_SYSTEM_CAPTURESTART = 0x0008,
        EVENT_SYSTEM_CAPTUREEND = 0x0009,
        EVENT_SYSTEM_MOVESIZESTART = 0x000A,
        EVENT_SYSTEM_MOVESIZEEND = 0x000B,
        EVENT_SYSTEM_CONTEXTHELPSTART = 0x000C,
        EVENT_SYSTEM_CONTEXTHELPEND = 0x000D,
        EVENT_SYSTEM_DRAGDROPSTART = 0x000E,
        EVENT_SYSTEM_DRAGDROPEND = 0x000F,
        EVENT_SYSTEM_DIALOGSTART = 0x0010,
        EVENT_SYSTEM_DIALOGEND = 0x0011,
        EVENT_SYSTEM_SCROLLINGSTART = 0x0012,
        EVENT_SYSTEM_SCROLLINGEND = 0x0013,
        EVENT_SYSTEM_SWITCHSTART = 0x0014,
        EVENT_SYSTEM_SWITCHEND = 0x0015,
        EVENT_SYSTEM_MINIMIZESTART = 0x0016,
        EVENT_SYSTEM_MINIMIZEEND = 0x0017,
        EVENT_SYSTEM_DESKTOPSWITCH = 0x0020,
        EVENT_CONSOLE_CARET = 0x4001,
        EVENT_CONSOLE_UPDATE_REGION = 0x4002,
        EVENT_CONSOLE_UPDATE_SIMPLE = 0x4003,
        EVENT_CONSOLE_UPDATE_SCROLL = 0x4004,
        EVENT_CONSOLE_LAYOUT = 0x4005,
        EVENT_CONSOLE_START_APPLICATION = 0x4006,
        EVENT_CONSOLE_END_APPLICATION = 0x4007,
        EVENT_OBJECT_CREATE = 0x8000,
        EVENT_OBJECT_DESTROY = 0x8001,
        EVENT_OBJECT_SHOW = 0x8002,
        EVENT_OBJECT_HIDE = 0x8003,
        EVENT_OBJECT_REORDER = 0x8004,
        EVENT_OBJECT_FOCUS = 0x8005,
        EVENT_OBJECT_SELECTION = 0x8006,
        EVENT_OBJECT_SELECTIONADD = 0x8007,
        EVENT_OBJECT_SELECTIONREMOVE = 0x8008,
        EVENT_OBJECT_SELECTIONWITHIN = 0x8009,
        EVENT_OBJECT_STATECHANGE = 0x800A,
        EVENT_OBJECT_LOCATIONCHANGE = 0x800B,
        EVENT_OBJECT_NAMECHANGE = 0x800C,
        EVENT_OBJECT_DESCRIPTIONCHANGE = 0x800D,
        EVENT_OBJECT_VALUECHANGE = 0x800E,
        EVENT_OBJECT_PARENTCHANGE = 0x800F,
        EVENT_OBJECT_HELPCHANGE = 0x8010,
        EVENT_OBJECT_DEFACTIONCHANGE = 0x8011,
        EVENT_OBJECT_ACCELERATORCHANGE = 0x8012,
        EVENT_OBJECT_INVOKED = 0x8013,
        EVENT_OBJECT_TEXTSELECTIONCHANGED = 0x8014,
        EVENT_OBJECT_CONTENTSCROLLED = 0x8015,
        EVENT_SYSTEM_ARRANGMENTPREVIEW = 0x8016,
    }

    [Flags]
    public enum WinHelpCommand : uint
    {
        HELP_CONTEXT = 0x0001,
        HELP_QUIT = 0x0002,
        HELP_INDEX = 0x0003,
        HELP_CONTENTS = 0x0003,
        HELP_HELPONHELP = 0x0004,
        HELP_SETINDEX = 0x0005,
        HELP_SETCONTENTS = 0x0005,
        HELP_CONTEXTPOPUP = 0x0008,
        HELP_FORCEFILE = 0x0009,
        HELP_KEY = 0x0101,
        HELP_COMMAND = 0x0102,
        HELP_PARTIALKEY = 0x0105,
        HELP_MULTIKEY = 0x0201,
        HELP_SETWINPOS = 0x0203,
        HELP_CONTEXTMENU = 0x000a,
        HELP_FINDER = 0x000b,
        HELP_WM_HELP = 0x000c,
        HELP_SETPOPUP_POS = 0x000d,
        HELP_TCARD = 0x8000,
        HELP_TCARD_DATA = 0x0010,
        HELP_TCARD_OTHER_CALLER = 0x0011,
    }

    [Flags]
    public enum WinHttpAutoDetectFlags : uint
    {
        WINHTTP_AUTO_DETECT_TYPE_DHCP,
        WINHTTP_AUTO_DETECT_TYPE_DNS_A
    }

    [Flags]
    public enum WinHttpAutoProxyFlags : uint
    {
        WINHTTP_AUTOPROXY_AUTO_DETECT = 0x00000001,
        WINHTTP_AUTOPROXY_CONFIG_URL = 0x00000002,
        WINHTTP_AUTOPROXY_HOST_KEEPCASE = 0x00000004,
        WINHTTP_AUTOPROXY_HOST_LOWERCASE = 0x00000008,
        WINHTTP_AUTOPROXY_RUN_INPROCESS = 0x00010000,
        WINHTTP_AUTOPROXY_RUN_OUTPROCESS_ONLY = 0x00020000,
    }

    public enum WinHttpProxyAccessType : uint
    {
        WINHTTP_ACCESS_TYPE_DEFAULT_PROXY = 0,
        WINHTTP_ACCESS_TYPE_NO_PROXY = 1,
        WINHTTP_ACCESS_TYPE_NAMED_PROXY = 3,
    }

    public enum WMIDPREQUESTCODE : int
    {
        WMI_GET_ALL_DATA = 0,
        WMI_GET_SINGLE_INSTANCE = 1,
        WMI_SET_SINGLE_INSTANCE = 2,
        WMI_SET_SINGLE_ITEM = 3,
        WMI_ENABLE_EVENTS = 4,
        WMI_DISABLE_EVENTS = 5,
        WMI_ENABLE_COLLECTION = 6,
        WMI_DISABLE_COLLECTION = 7,
        WMI_REGINFO = 8,
        WMI_EXECUTE_METHOD = 9,
    }

    [Flags]
    public enum WmiGuidAccessRights : uint
    {
        WMIGUID_QUERY = 0x0001,
        WMIGUID_SET = 0x0002,
        WMIGUID_NOTIFICATION = 0x0004,
        WMIGUID_READ_DESCRIPTION = 0x0008,
        WMIGUID_EXECUTE = 0x0010,
        TRACELOG_CREATE_REALTIME = 0x0020,
        TRACELOG_CREATE_ONDISK = 0x0040,
        TRACELOG_GUID_ENABLE = 0x0080,
        TRACELOG_ACCESS_KERNEL_LOGGER = 0x0100,
        TRACELOG_LOG_EVENT = 0x0200,
        TRACELOG_ACCESS_REALTIME = 0x0400,
        TRACELOG_REGISTER_GUIDS = 0x0800,

        WMIGUID_ALL_ACCESS_WIN2K =
            (STANDARD_RIGHTS_READ |
            WMIGUID_QUERY |
            WMIGUID_SET |
            WMIGUID_NOTIFICATION |
            WMIGUID_READ_DESCRIPTION |
            WMIGUID_EXECUTE |
            TRACELOG_CREATE_REALTIME |
            TRACELOG_CREATE_ONDISK |
            TRACELOG_GUID_ENABLE |
            TRACELOG_ACCESS_KERNEL_LOGGER |
            TRACELOG_LOG_EVENT |
            TRACELOG_ACCESS_REALTIME),
        WMIGUID_ALL_ACCESS_WINXP =
            (WMIGUID_ALL_ACCESS_WIN2K |
            SYNCHRONIZE |
            TRACELOG_REGISTER_GUIDS),

        #region Copied from StandardAccessRights
        DELETE = StandardAccessRights.DELETE,
        READ_CONTROL = StandardAccessRights.READ_CONTROL,
        SYNCHRONIZE = StandardAccessRights.SYNCHRONIZE,
        WRITE_DAC = StandardAccessRights.WRITE_DAC,
        WRITE_OWNER = StandardAccessRights.WRITE_OWNER,
        STANDARD_RIGHTS_ALL = StandardAccessRights.STANDARD_RIGHTS_ALL,
        STANDARD_RIGHTS_EXECUTE = StandardAccessRights.STANDARD_RIGHTS_EXECUTE,
        STANDARD_RIGHTS_READ = StandardAccessRights.STANDARD_RIGHTS_READ,
        STANDARD_RIGHTS_REQUIRED = StandardAccessRights.STANDARD_RIGHTS_REQUIRED,
        STANDARD_RIGHTS_WRITE = StandardAccessRights.STANDARD_RIGHTS_WRITE,
        GENERIC_ALL = StandardAccessRights.GENERIC_ALL,
        GENERIC_EXECUTE = StandardAccessRights.GENERIC_EXECUTE,
        GENERIC_WRITE = StandardAccessRights.GENERIC_WRITE,
        GENERIC_READ = StandardAccessRights.GENERIC_READ,
        #endregion
    }

    public enum WMIQ_ANALYSIS_TYPE : int
    {
        WMIQ_ANALYSIS_RPN_SEQUENCE = 0x1,
        WMIQ_ANALYSIS_ASSOC_QUERY = 0x2,
        WMIQ_ANALYSIS_PROP_ANALYSIS_MATRIX = 0x3,
        WMIQ_ANALYSIS_QUERY_TEXT = 0x4,
        WMIQ_ANALYSIS_RESERVED = 0x8000000,
    }

    public enum WTS_CONNECTSTATE_CLASS : int
    {
        WTSActive = 0,
        WTSConnected = 1,
        WTSConnectQuery = 2,
        WTSShadow = 3,
        WTSDisconnected = 4,
        WTSIdle = 5,
        WTSListen = 6,
        WTSReset = 7,
        WTSDown = 8,
        WTSInit = 9,
    }
}
